I am evaluating zeoslib for my project.
Is there a way to identify standard SQL errors (like for instance a Unique Key violation) by any other means than doing a string comparison with a implementation-dependent error string?
How can I retrieve either the native error code (from looking at the DBC code, this does not seem to be included in the Exception object) or (better) a database-independent error code for several kinds of SQL error.
If there would be a method on the connection to retrieve the native error code, I could probably implement the necessary mappings for the database engines in question myself.
Why not include a record in the exception object, which can hold any DB specific error information?
Why do I need this?
I have a application-defined lock table, in which the failure of inserting a record (unique key violation) means that a lock is in place. I need to be distinguish this situation from other possible SQL errors, though.
Regards,
Gunnar
SQL Exception handling
Freature requests from users for ZeosLib's DBOs
Moderators: gto, cipto_kh, EgonHugeist, mdaems
Jump to
- Links
- ↳ Bugtracker
- ↳ Downloads
- ↳ Subversion
- ↳ GitHub
- ZEOS Library - General
- ↳ Announcements
- ↳ Downloads
- ↳ Documentations
- ↳ Tutorials
- ↳ ZDBC (ZEOS Database Connectivity)
- ↳ User Contributions
- ↳ Feature Requests
- ↳ User Patches
- ZEOS DBO v8.x
- ↳ ZeosLib 7.3/8.0 Forum
- ZEOS DBO v7.x
- ↳ ZeosLib 7.2 Forum
- ↳ ZeosLib 7.1 stable Forum
- ↳ ZeosLib 7.0 Stable Forum
- ↳ ZeosLib 7.0 Beta Forum
- SQL Servers and Databases
- ↳ ADO
- ↳ DB2
- ↳ Firebird
- ↳ Interbase
- ↳ MS SQL Server
- ↳ MySQL
- ↳ Oracle
- ↳ OleDB (Microsoft Windows)
- ↳ ODBC
- ↳ PostgreSQL
- ↳ SQLite
- ↳ Sybase ASE
- Compiler related
- ↳ CBuilder / C++
- ↳ Lazarus / Freepascal
- ZEOS DBO V 6.x
- ↳ 6.6 - stable
- ↳ 6.5.1 (alpha) - 6.6.x (beta)
- ↳ 6.1.5
- ↳ Other 6.x Versions
- ↳ Bug Reports
- ZEOS DBO V 5.x
- ↳ 5.x Versions
- Software projects using ZeosLib
- ↳ SQLite Administrator
- Other and Non-Technical
- ↳ Off Topic