DF_DATABASE_DUPREC_STATE

The SQL status code for the back-end’s duplicate records error.

Level

Database

Supported by

DataFlex ODBC Driver, revision 5 and higher

Type

String, temporary

Access

Read/Write

Values

SQL status code

Syntax

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}

Driver Configuration Keyword

Duprec_State

Remarks

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.