![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Sat, Mar 12 2016 9:17 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | I've decided to move as much into sql as possible for one of the subsystems of an application and I want to trap INSERT and UPDATE queries for inappropriate data (eg strings to long) and locking problems.
I started by trying to stuff 80 bytes into a VARCHAR(5) field using INSERT. An error message is generated but TEDBQuery's events (well the three I tried anyway) aren't triggered. I'm hoping there's a way to trap problems when using a query and I'm just to thick to see it. Help anyone? Roy Lambert |
Mon, Mar 14 2016 8:16 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< I've decided to move as much into sql as possible for one of the subsystems of an application and I want to trap INSERT and UPDATE queries for inappropriate data (eg strings to long) and locking problems. I started by trying to stuff 80 bytes into a VARCHAR(5) field using INSERT. An error message is generated but TEDBQuery's events (well the three I tried anyway) aren't triggered. I'm hoping there's a way to trap problems when using a query and I'm just to thick to see it. Help anyone? >> SQL execution errors are simply raised as exceptions, so you would just use normal exception handling techniques to deal with them. Either that, or use a database procedure and trap/handle the exception there. Tim Young Elevate Software www.elevatesoft.com |
Mon, Mar 14 2016 10:01 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>SQL execution errors are simply raised as exceptions, so you would just use normal exception handling techniques to deal with them. Either that, or use a database procedure and trap/handle the exception there. I was hoping to avoid another layer of try..except. I think I'll override ExecSQL in my subclassed query and add it in there. Roy |
This web page was last updated on Wednesday, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |