DF_DRIVER_LAST_ERROR_TEXT
The text of the last error generated by the back end.
Level
Driver
Supported by
The DataFlex SQL Drivers (SQL Server, DB2, and ODBC), revision 5 and higher.
Type
String, temporary
Access
Read Only
Values
The text of the last error generated by the driver.
Syntax
Use cli.pkg
Get_Attribute DF_DRIVER_LAST_ERROR_TEXT of {driverNumber} to {StringVariable}
Driver Configuration Keyword
None
Remarks
Whenever an error is generated by the driver, this attribute is updated to reflect the error text.
Example
Function DriverIndex String sDriver Returns Integer
String sCurrentDriver
Integer iNumberOfDrivers iDriver iCount
Move 0 to iDriver
Get_Attribute DF_NUMBER_DRIVERS to iNumberOfDrivers
For iCount From 1 To iNumberOfDrivers
Get_Attribute DF_DRIVER_NAME of iCount To sCurrentDriver
If (Uppercase(sCurrentDriver) = Uppercase(sDriver)) Begin
Move iCount to iDriver
End
Loop
Function_Return iDriver
End_Function // DriverIndex
Procedure ShowDriverAttribute
String sAttribValue
Integer iDriver
Get DriverIndex "MSSQLDRV" to iDriver
Get_Attribute DF_DRIVER_LAST_ERROR_TEXT of iDriver to sAttribValue
Showln "Last error text: " sAttribValue
End_Procedure
The sample code above shows the current setting for a given driver.