This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Returns the description of an error.
Syntax
s = <ADODB_Connection>.Errors(lIndex).Description
Returns
String.
Parameters
Name |
Type |
Optional |
Meaning |
lIndex |
Numeric |
No |
Error index from 1 to <ADODB_Connection>.Errors.Count |
Remarks
Both the provider and ADODB can be the source of the error.
The provider should pass error information to ADODB. When an error occurs, ADODB should create an Error object, which contains error information.
ADODB should also add the Error object to the Errors Collection.
Restrictions
See also
Examples
...
'---To check if there is an error, always use connection and Errors.Count method
'---In this example all errors are reported in one go using pConn.Errors.Msg
If pConn.Errors.Count Then
PrintL "--> Error happened:" In %CCOLOR_FLIGHTRED
printl pConn.Errors.Msg
pConn.Errors.Clear
End If
...
...
'---To check if there is an error, always use connection and Errors.Count method
'---In this example every single error is reported reading Error by Error information
If pConn.Errors.Count Then
PrintL "--> Error happened:" In %CCOLOR_FLIGHTRED
For nError = 1 to pConn.Errors.Count
PrintL "Error number..:", pConn.Errors(nError).Number
PrintL "Description...:", pConn.Errors(nError).Description
PrintL "Source........:", pConn.Errors(nError).Source
PrintL "SQLState......:", pConn.Errors(nError).SQLState
PrintL "NativeError...:", pConn.Errors(nError).NativeError
Next
'---Clear all errors so new errors will restart to fill Errors collection
pConn.Errors.Clear
End If
...