The information in this article applies to:
SUMMARYThis article discusses what is necessary to take advantage of ActiveX Data Objects (ADO) with Visual Basic. MORE INFORMATIONWhat is ADO?ActiveX Data Objects is a programming model, which means that it is not dependent upon any given back-end engine. Currently, however, the only engine supporting the ADO model is OLE-DB. This is accomplished through the OLE-DB Provider for ODBC.The ADO object model consists of six objects:
Installing ADO on your ComputerTo properly install ADO on your computer, you need to install MDAC. This installs both ADO and necessary underlying ADO components. OLE-DB also requires ODBC version 3.0 Components.MDAC is available free for download fom the Web at the following URL: http://www.microsoft.com/data/After ADO is installed on your computer, create a new project inside Visual Basic. From the Projects menu, choose References, and then select Microsoft OLE-DB ActiveX Data Objects 2.1 Library. The documentation for the ADO Error object indicates that the Errors Collection will be populated if any error occurs within ADO or its underlying provider. This is somewhat incorrect. Depending on the source of the error, ADO's errors collection may not be populated. You need to check both the Visual Basic Error object as well as the ADO Errors collection. ADO vs. DAOIf you include references to both ADO and DAO in the same project, you will have some difficulty. Both use the same object named Recordset, so the following code is ambiguous:
To specify which object model you want to use, include a qualifier in front:
REFERENCES
For more information, please see the following article in the Microsoft Knowledge Base: Q167957 INFO: Extracting Error Information from ADO in VB Additional query words:
Keywords : kbADO kbDatabase kbVBp500 kbVBp600 kbGrpVBDB kbGrpMDAC kbDSupport kbADO210sp2 kbMDAC210SP2 |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |