Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
elevateDB OnQueryError or OnScript Error Event Like dbIsam |
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. timyoung@elevatesoft.com | 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 Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |