The SQL status code for the back-end’s duplicate records error.
Database
DataFlex ODBC Driver, revision 5 and higher
String, temporary
Read/Write
SQL status code
Use cli.pkg
Get_Attribute DF_DATABASE_DUPREC_STATE of {driverNumber} {databaseHandle} to {StringVariable}
Set_Attribute DF_DATABASE_DUPREC_STATE of {driverNumber} {databaseHandle} to {StringVariable}
The SQL status code for the back-end’s duplicate records error. When this error occurs, the driver will translate it to the DataFlex duplicate record error number (DFERR__DUPLICATE_REC, error 28 "Duplicate records not allowed").
Procedure ShowDBAttribute Integer iDriver Handle hDatabase
String sAttribValue
Get_Attribute DF_DATABASE_DUPREC_STATE of iDriver hDatabase to sAttribValue
Showln "Duplicate records error SQL State: "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.