The following table shows the ADO error values.
Constant |
Value |
Description |
adErrInvalidArgument | 3001 | The application is using parameters that are of the wrong type, are out of acceptable range, or are in conflict with one another. |
adErrNoCurrentRecord | 3021 | Either BOF or EOF is True, or the current record has been deleted. The operation requested by the application requires a current record. |
adErrIllegalOperation | 3219 | The operation requested by the application is not allowed in this context. |
adErrFeatureNotAvailable | 3251 | The operation requested by the application is not supported by the provider. |
adErrItemNotFound | 3265 | ADOCE could not find the object in the collection corresponding to the name or ordinal reference requested by the application. |
adErrObjectNotSet | 3420 | The object referenced by the application no longer points to a valid object. |
adErrDataConversion | 3421 | The application is using a value of the wrong type for the current operation. |
adErrObjectClosed | 3704 | The operation requested by the application is not enabled if the object is closed. |
adErrObjectOpen | 3705 | The operation requested by the application is not enabled if the object is open. |
adErrProviderNotFound | 3706 | ADO could not find the specified provider. |
adErrInvalidConnection | 3709 | The connection string you specified is invalid. |
The following code example sets the constants for the ADO errors.
Const adErrInvalidArgument = 3001
Const adErrNoCurrentRecord = 3021
Const adErrIllegalOperation = 3219
Const adErrFeatureNotAvailable = 3251
Const adErrItemNotFound = 3265
Const adErrObjectNotSet = 3420
Const adErrDataConversion = 3421
Const adErrObjectClosed = 3704
Const adErrObjectOpen = 3705
Const adErrProviderNotFound = 3706
Const adErrInvalidConnection = 3709