please dont rip this site

Error Object

An Error object contains details about data access errors pertaining to a single operation involving ADO.


Description, HelpContext, HelpFile, NativeError, Number, Source, SQLState


You can read an Error object’s properties to obtain specific details about each error, including the following:

· The Description property, which contains the text of the error alert.

· The Number property, which contains the Long integer value of the error constant.

· The Source property, which identifies the object that raised the error. This is particularly useful when you have several Error objects in the Errors collection following a request to a data source.

· The HelpFile and HelpContext properties, which indicate the appropriate Microsoft Windows Help file and Help topic, respectively, (if any exist) for the error.

· The SQLState and NativeError properties, which provide information from ODBC data sources.

When a provider error occurs, it is placed in the Errors collection of the Connection object. If there is no valid Connection object, you will need to retrieve error information from the Microsoft® Visual Basic® for Applications Err object. ADO supports the return of multiple errors by a single ADO operation to allow for error information specific to the provider.

ADO can return the following specific errors:

Constant Name





You are using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.



Either BOF or EOF is True, or the current record has been deleted; the operation you requested requires a current record.



The operation you requested is not allowed in this context.



You may not explicitly close a Connection object while in the middle of a transaction.



The operation you requested is not supported by the provider.



ADO could not find the object in the collection corresponding to the requested name or ordinal reference.



The object reference you are using no longer points to a valid object.



You are using a value of the wrong type for the current operation.



The operation you requested is not allowed if the object is closed.



The operation you requested is not allowed if the object is open.



ADO could not find the specified provider.



You cannot change the ActiveConnection property of a Recordset object with a Command object as its source.



You have improperly defined a Parameter object.



You requested an operation on an object with a reference to a closed or invalid Connection object.

Just as providers do, ADO clears the OLE Error Info object before making a call that could potentially generate a new error. However, the Errors collection on the Connection object is cleared and populated only when ADO or the provider generates a new error.

Some properties and methods return warnings that appear as Error objects in the Errors collection but do not halt a program's execution. Before you call the Delete, Resync, UpdateBatch, or CancelBatch methods on a Recordset object, or before you set the Filter property on a Recordset object, call the Clear method on the Errors collection so that you can read the Count property of the Errors collection to test for returned warnings.

To refer to an Error object in a collection by its ordinal number, use either of the following syntax forms:


See Also

Connection, Errors, Item

file: /Techref/language/asp/comp/dadobj01_2.htm, 9KB, , updated: 2006/1/11 16:06, local time: 2022/8/9 07:03,

 ©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> Error Object (ADO)</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2022 contributors:
o List host: MIT, Site host, Top posters @20220809
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!