| [ Team LiB ] |
Referencing the Type LibrariesBefore seeing how to use these collections and objects, you need to know how to reference the object model libraries for use. The object models are found in type libraries in the file system. A type library contains the information about the object models such as the collections, properties, and methods. Referencing the type libraries isn't difficult, but it is still very important. Because Visual Basic .NET uses ADO.NET by default, you will have to reference all the object models you are going to need. To reference the object models, choose Add Reference from Visual Studio .NET's Project menu. After you're in the Add Reference dialog box, click on the COM tab. You then have to find the type libraries for the object models and select them. The type library name that you will be using is as follows: Microsoft ActiveX Data Objects 2.7 Library. This is also referred to as the ADODB object model. You can see this library, as well as other Microsoft ActiveX Data Objects Libraries, in Figure A.2. Figure A.2. Registering the COM type libraries.Tip
After the library has been selected, you can see the ADODB reference entry in the Solution Explorer under references. |
| [ Team LiB ] |