![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Jan 19 2011 6:35 PM | Permanent Link |
George | I would like to trap SQL or Script Error inside a Try-Except-End block. I
usually do this in dbIsam by looking at the e.message when the dbIsam OnQuery error fires up in the Exception handling block. Is there an equivalent event OnQueryError or OnScriptError for Elevatedb? Thanks, George Patena |
Wed, Jan 19 2011 6:54 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | George,
<< I would like to trap SQL or Script Error inside a Try-Except-End block. I usually do this in dbIsam by looking at the e.message when the dbIsam OnQuery error fires up in the Exception handling block. Is there an equivalent event OnQueryError or OnScriptError for Elevatedb? >> Just wrap the query or script execution in a try..except block and use the except block to trap for any errors: try MyQuery.ExecSQL; except on E: Exception do begin if (E is EEDBError) then // Handle EDBError here else raise end; end; -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jan 19 2011 7:10 PM | Permanent Link |
George | << try
MyQuery.ExecSQL; except on E: Exception do begin if (E is EEDBError) then // Handle EDBError here else raise end; end>> Very useful and applicable to other types of error handling (other than E is EEDBError). Thanks Tim, George Patena |
This web page was last updated on Friday, July 11, 2025 at 10:48 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |