The information in this article applies to:
SUMMARY
Visual Basic version 4.0 includes two TypeLibs for data access
objects (DAO):
MORE INFORMATION
The Microsoft DAO 2.5/3.0 Compatibility Library is provided for
compatibility with older DAO methods. Objects and methods that have
changed significantly or were replaced in the newer DAO 3.0 TypeLib are
preserved in the DAO 2.5/3.0 TypeLib. These include such things as:
DynaSets, SnapShots, and Tables as well as methods (CreateDynaset,
CreateSnapshot, and so on) that are specific to these objects.
How to Change the Version of the DAO TypeLibYou can change the version of the TypeLib that you are using by choosing Tools References from the menu. This brings up a dialog with all of the available TypeLibs.Note that if you choose to use the newer DAO 3.0 and continue to use obsolete DAO 2.5 methods and objects, you may see some unexpected errors. For example, under DAO 2.5, the following code is perfectly acceptable:
However, if you chose to use the DAO 3.0 Library, the references to Dynaset and CreateDynaset will generate this error:
This is because the Dynaset object and CreateDynaset method do not exist in the DAO 3.0 Library. The code could be rewritten properly as:
Note that when you reload a Project that was saved with a particular TypeLib, Visual Basic detects this and loads the appropriate TypeLib. Additional query words: 4.00 vb4win vb4all
Keywords : kbDatabase |
Last Reviewed: June 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |