Danh mục

Referencing the Type Libraries

Số trang: 2      Loại file: pdf      Dung lượng: 22.69 KB      Lượt xem: 16      Lượt tải: 0    
tailieu_vip

Hỗ trợ phí lưu trữ khi tải xuống: miễn phí Tải xuống file đầy đủ (2 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Tham khảo các Thư viện Type Trước khi nhìn thấy làm thế nào để sử dụng các bộ sưu tập và các đối tượng, bạn cần phải biết làm thế nào để tham khảo các thư viện mô hình đối tượng để sử dụng. Các mô hình đối tượng được tìm thấy trong các thư viện loại trong hệ thống tập tin
Nội dung trích xuất từ tài liệu:
Referencing the Type Libraries Referencing the Type LibrariesBefore seeing how to use these collections and objects, you need to know how toreference the object model libraries for use. The object models are found in type librariesin the file system. A type library contains the information about the object models such asthe collections, properties, and methods. Referencing the type libraries isnt difficult, butit is still very important.Because Visual Basic .NET uses ADO.NET by default, you will have to reference all theobject models you are going to need. To reference the object models, choose AddReference from Visual Studio .NETs Project menu. After youre in the Add Referencedialog box, click on the COM tab. You then have to find the type libraries for the objectmodels 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 ADODBobject model.You can see this library, as well as other Microsoft ActiveX Data Objects Libraries, inFigure A.2. Figure A.2. Registering the COM type libraries.Tip You can use both ADO libraries and ADO.NET classes in the same application without worrying about the order of libraries in the references. This is great when youre converting applications from ADO to ADO.NET. To use all libraries and not worry about the order of reference, you must prefix your objects with the library with which they come. Here are some examples, with the specific library types: Dim odaTest as OLEDB.OLEDBDataAdapter Dim rstTestADO as ADODB.Recordset Dim catTest as ADOX.Catalog Although not all objects are shared between the libraries, its a good idea to specify the library while youre getting used to the objects.After the library has been selected, you can see the ADODB reference entry in theSolution Explorer under references.

Tài liệu được xem nhiều: