Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 Manual for C++Builder 6 » Getting Started » Exception Handling and Errors |
{ { MyEDBTable->DatabaseName="Tutorial"; MyEDBTable->TableName="customer"; MyEDBTable->Exclusive=true; MyEDBTable->ReadOnly=False; try { MyEDBTable->Open(); } catch(const Exception &E) { if (dynamic_cast<EDatabaseError*>(E) & dynamic_cast<EEDBError*>(E)) { if (dynamic_cast<EEDBError&>(*E)->ErrorCode== EDB_ERROR_LOCK) { ShowMessage("Cannot open table "+TableName+ ", another user has the table open already"); } else { ShowMessage("Unknown or unexpected "+ "database engine error # +IntToStr( dynamic_cast<EEDBError&>(*E)->ErrorCode)); } } else { ShowMessage("Unknown or unexpected "+ "error has occurred"); } } } }
Event | Description |
OnEditError | This event is triggered when an error occurs during a call to the TEDBTable, TEDBQuery , or TEDBStoredProc Edit method . The usual cause of an error is a row lock failure if the current session is using the pessimistic row locking protocol (the default). Please see the Inserting, Updating, and Deleting Rows topic for more information on using this event, and the Locking and Concurrency topic for more information on the ElevateDB row locking protocols. |
OnDeleteError | This event is triggered when an error occurs during a call to the TEDBTable, TEDBQuery , or TEDBStoredProc Delete method. The usual cause of an error is a row lock failure (a row lock is always obtained before a delete regardless of the locking protocol in use for the current session). Please see the Inserting, Updating, and Deleting Rows topic for more information on using this event, and the Locking and Concurrency topic for more information on the ElevateDB row locking protocols. |
OnPostError | This event is triggered when an error occurs during a call to the TEDBTable, TEDBQuery , or TEDBStoredProc Post method. The usual cause of an error is a constraint violation, however it can also be triggered by a row lock failure if the locking protocol for the current session is set to optimistic. Please see the Inserting, Updating, and Deleting Rows topic for more information on using this event, and the Locking and Concurrency topic for more information on the ElevateDB row locking protocols. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |