LastDriverError - cCLIHandler
Returns the string value of the last generated driver error.
Type: Function
Return Data Type: String
Syntax
Function LastDriverError Returns String
Call Example
Get LastDriverError to StringVariable
Description
Returns the string value of the last generated driver error.
Error texts generated by SQL Server and other client/server databases are generally larger than those generated by the embedded database. In character mode environments, it happens that the text is larger than the supported maximum error text length. In those cases, you can get the complete error text by using the LastDriverError function.
Sample
To show the last error text, one would program:
Procedure ShowLastSQLErrorText
Handle hoCLIHandler
String sLastError
Get Create U_cCLIHandler to hoCLIHandler
If (hoCLIHandler > 0) Begin
Set psDriverID of hoCLIHandler to "MSSQLDRV"
Get LastDriverError of hoCLIHandler to sLastError
End
Send Destroy of hoCLIHandler
Showln "ERROR: " sLastError
End_Procedure
Return Value
Returns the string value of the last generated driver error.