Interpreting Database-related Error Messages

Data Base Management Systems (DBMS) produce errors that can be confusing to the typical Advantage User.  Two common examples of these messages are typically the result of a duplicate record on an insert, or a deadlock condition within the database.  The format of the message varies depending upon the DBMS that is being used (that is, Oracle or SQL Server).  Advantage intercepts these messages and substitutes them with a more meaningful message, as indicated on the Messages table.  The following table provides the DBMS Message and a cross reference to the Advantage error message that is displayed to the user.

DBMS Message

Error Code

SQL State

Error Message (MESG)

ORA-00001: unique constraint (Table name) violated

SQL Server:  Violation of %ls constraint '%.*ls'. Cannot insert duplicate key in object '%.*ls'.

Oracle: 00001

SQL Server:  2627

Oracle:  23000

Q0134 - A unique index was violated.  Either a duplicate record was inserted, or a unique attribute was modified: %table name% %SQLCODE% %SQLSTATE%.

ORA-00060: deadlock detected while waiting for resource

SQL Server:  Transaction (Process ID %d) was deadlocked on {%Z} resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Oracle:  60

SQL Server:  1205

Oracle:  61000

Q0135 - Two or more transactions deadlocked with each other while waiting to process.  Please resubmit the transaction: %SQLCODE% %SQLSTATE%.