ACC: DAO Version Property Returns "3.0" for Jet 3.5 DatabasesLast reviewed: July 10, 1997Article ID: Q171192 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. The DAO Version property of a Microsoft Jet 3.5 database object in a Microsoft Jet workspace returns "3.0" even though the DAO Version property of the DBEngine object returns "3.5." WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
CAUSEThe DAO Version property returns the version of Microsoft Jet that created the database. The Microsoft Jet database file format did not change from Microsoft Jet 3.0 to 3.5; therefore, the Version property always "3.0".
RESOLUTIONBecause the Version property of DAO cannot distinguish between databases created with Microsoft Jet 3.0 and Microsoft Jet 3.5, you can determine which version of Microsoft Jet created the database by determining which version of Microsoft Access was used to create or convert the database. To determine which version of Microsoft Access created the database, you can use the AccessVersion property. NOTE: The AccessVersion property is unsupported and subject to change in future releases of Microsoft Access. The AccessVersion property is not a native Microsoft Jet property, but an application property specific to Microsoft Access. Therefore, this property will only exist if you have opened the database at least once in Microsoft Access version 2.0 or later. For a Microsoft Access 2.0 database, the AccessVersion property returns "02.00". For a Microsoft Access 7.0 database, the AccessVersion property returns a string that always begins with "06" followed by a period and two digits. For a Microsoft Access 97 database, the AccessVersion property returns a string that always begins with "07" followed by a period and two digits. In both Microsoft Access 7.0 and 97, the final two digits returned by the AccessVersion property may vary depending on the dynamic-link library (DLL) that was used to create the database’s Visual Basic for Applications project. Therefore, your code should ignore the final two digits if you want to determine the version that created or converted the database. The following function returns the version of Microsoft Access used to create or convert a database by examining only the first two digits returned for the AccessVersion property. This function takes a String argument that specifies the path to the database.
STATUSThis behavior is by design.
MORE INFORMATIONThis behavior does not occur with a database object in an ODBCDirect workspace; in that case, the Version property returns the version of the ODBC driver rather than the version of Microsoft Jet.
Steps to Reproduce Behavior
?DBEngine.VersionThis behavior does not occur with a database object in an ODBCDirect workspace. In that case, the Version property returns the version of the ODBC driver rather than the version of Microsoft Jet.
REFERENCESFor more information about the Version property, search the Help Index for "Version property". |
Keywords : kbcode MdlDao
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |