The SQL Status codes that are generated when a deadlock or lock timeout error occurs.
Database
The DataFlex SQL Drivers (SQL Server, DB2 and ODBC), revision 5 and higher
String, temporary
Read/Write
SQL status codes separated by |
Use cli.pkg
Get_Attribute DF_DATABASE_LOCK_STATE of {driverNumber} {databaseHandle} to {StringVariable}
Set_Attribute DF_DATABASE_LOCK_STATE of {driverNumber} {databaseHandle} to {StringVariable}
The SQL Status codes that are generated when a deadlock or lock timeout error occurs. When an error occurs with a status code in this list, the error will be translated to the DataFlex lock timeout error, thus enabling the automatic retry mechanism.
The string can hold multiple SQL status codes; if this occurs, they will be separated by the ‘|’ character. If a back end generates SQL status codes XY0001 and DF0002 in case of a deadlock and lock timeout, the DF_DATABASE_LOCK_STATE should be set to "|XY0001|DF0002|".
Procedure ShowDBAttribute Integer iDriver Handle hDatabase
String sAttribValue
Get_Attribute DF_DATABASE_LOCK_STATE of iDriver hDatabase to sAttribValue
Showln "Lock SQL State(s): "sAttribValue
End_Procedure
The sample code above shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.