HOWTO: Insuring Jet 3.5 Is Installed Correctly (Part I)
ID: Q240377
|
The information in this article applies to:
-
Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 5.0, 6.0
-
Microsoft Data Access Components versions 1.5, 2.1 SP2, 2.5
SUMMARY
This article details steps you can take to correct an installation problem with Microsoft Jet 3.51. It covers trouble-shooting for DAO, ADO, and ODBC access methods.
MORE INFORMATIONWARNING: This article contains specific information regarding editing the Windows Registry. You should always back up the registry before you edit it. If you alter the registry, you could cause your computer to stop functioning. Only an expert level programmer should attempt the steps in this article.
Microsoft provides this information without warranty either expressed 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 safe registry editing procedures.
If you have limited experience, you may want to contact a Microsoft Certified Solution Provider. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/
For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.asp Introduction
The Microsoft Jet database engine is used by a wide variety of applications so it is possible that an application installation, or, more likely, an application uninstallation could adversely affect other applications on your computer. This article details steps you can take to make sure that Microsoft Jet is correctly installed on your machine.
The document is divided into three sections, (a) Troubleshooting the Access Method, which covers making sure the DAO, ADO, and ODBC drivers are installed correctly, (b) Troubleshooting Microsoft Jet, which covers the Jet DLLs and registry settings, and (c) Resource Data, which lists registry keys that would make the body of the article difficult to read.
Troubleshooting the Access Method
Before troubleshooting the Jet installation, you need to make sure that the access method is correctly installed. The following sections cover DAO, ODBC, and ADO.
Data Access Objects (DAO)
DAO is the most common Jet access method. The following steps can be used to make sure that it is properly installed:
-
Make sure you have the following file:
C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO350.DLL NOTE: The drive letter may be different if your copy of Windows is installed on a drive other than drive C:.
-
If your project references the Microsoft DAO 2.5/3.5 (or 3.51) Compatibility Library instead of the Microsoft DAO 3.5 (or 3.51) Library, then you need to make sure the following file is installed:
C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO2535.TLB
-
You need to make sure that the registry keys for DAO exist. The registry keys are listed in the Microsoft DAO Registry Settings section later in this article. Use the RegEdit program to verify the registry keys exist. If the registry keys are missing or pointing to a nonexistent file, you can manually unregister and re-register DAO350.dll by running the following two commands from the Windows Start button and select Run or from the MS/DOS command prompt:
REGSVR32.EXE /U
"C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO350.DLL"
REGSVR32.EXE
"C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO350.DLL"
Note that the earlier two commands have a line break for readability -- run each command on one continuous line.
Alternately, you can edit the registry directly. Instructions for applying the values through a .reg file are given in the Microsoft DAO Registry Settings section.
-
Once the file and registry settings are in place, you can test the DAO installation through code. Make a reference to the Microsoft DAO 3.5 (or 3.51) Library in your project and execute the following statement:
Debug.Print DBEngine.Version
If the statement works, yet your application still fails, you should continue with the Troubleshooting Microsoft Jet section.
If the test code earlier gives error 429, check that the DAO design-time license key exists on your computer. The following three lines may be saved to a file with the .reg extension and imported into the registry through the RegEdit program:
REGEDIT4
[HKEY_CLASSES_ROOT\Licenses\F4FC596D-DFFE-11CF-9551-00AA00A3DC45]
@="mbmabptebkjcdlgtjmskjwtsdhjbmkmwtrak"
-
If the code fails with an Access Violation, some of the support files may be out of date, typically:
OLEAUT32.dll
MSVCRT.dll
The latest version of these files can be obtained by installing the latest version of:
http://www.microsoft.com/data
Microsoft Data Access Components (MDAC)
from the World Wide Web. Run it on your computer to install the latest support files.
NOTE: Installing this file may overwrite the Microsoft Access ODBC drivers as outlined in the following section. If you have programs that use these drivers, you should be cautious about upgrading them.
-
Occasionally, an access violation may result from a mismatch between the version of DAO350.dll and some of the other Jet or support DLLs. For example, if you have a 3.50 version of DAO350.dll and Jet 3.51, you might have problems. Upgrading to a 3.51 version of DAO350.dll might help.
Microsoft Access ODBC Drivers
Installing Access 2000, Visual Basic 6 SP3, Windows 2000, ADO 2.1 or later, and other products may break programs that use the Microsoft Access ODBC driver. These applications replace the Microsoft Jet 3.5 ODBC drivers with Microsoft Jet 4.0 ODBC drivers. These drivers have different capabilities and may cause your application to fail under certain circumstances. You can check the version numbers of the following files:
ODBCJT32.dll
ODBCJI32.dll
ODEXL32.dll
ODDBSE32.dll
ODPDX32.dll
ODTEXT32.dll
ODFOX32.dll
These files are located in your WINDOWS\SYSTEM (or WINNT\SYSTEM32 for Windows NT) directory. The file version should start with 3.5 or 3.51.
If the version number starts with 4.0, then the following Knowledge Base article deals specifically with this problem:
Q237575 Reverting to the Access 97 ODBC Driver After Installing MDAC
The article can also be used if the files do not exist at all. Once the drivers are in place, you should be able to view them in the ODBC Administrator in the Control Panel, create DSNs to MDB and ISAM files, and compact an Access database. If the above article does not resolve the problem and you can use other ODBC drivers without problem, continue to the Trouble-Shooting Microsoft Jet section.
ActiveX Data Objects (ADO)
-
First verify that you can use ADO with a provider other than the OLEDB Provider for Microsoft Jet. If not, then you need to verify that ADO is properly installed and registered.
The following Knowledge Base article will help you debug the Microsoft Data Access Components:
Q232060 HOWTO: MDAC Setup Troubleshooting Guide
Once ADO is installed and working properly proceed with the following steps to verify that the OLEDB provider for Microsoft Jet is properly installed and registered.
-
The OLEDB provider for Microsoft Jet 3.5 consists of the following two files:
C:\WINDOWS\SYSTEM\MSJT4JLT.DLL (WINNT\SYSTEM32 for Windows NT)
C:\PROGRAM FILES\COMMON FILES\SYSTEM\OLE DB\MSJTOR35.DLL
MSJT4JLT.DLL is Jet 3.52, a special version of Jet 3.5 specifically for ADO. It does not support linked files, stored queries, or the Installable ISAM drivers. It does rely on some of the other Jet 3.51 core files, specifically MSJTER35.dll and MSJINT35.dll, also located in the system directory.
If these files do not exist, you can obtain them by downloading
MDAC 2.0
from the following location on the Web, or from Visual Basic 6 (versions prior to SP3). MDAC 2.1 and later do not contain these files.
If you do not have MDAC 2.1 or later on your computer, you can
download the MDAC 2.0 version of the MDAC_TYP.exe file and run it to install these components. This MDAC 2.0 version of the MDAC_TYP.EXE file can be found at the following location:
http://microsoft.com/data/download_20300223.htm
If you do have a 2.1 or later version of MDAC on your computer, copy the MDAC 2.0 MDAC_TYP.exe file to a clean directory and run the following command:
mdac_typ.exe /c /t:C:\MDAC20
This extracts the files into the C:\MDAC20 directory without installing them on your system. You can then copy the MSJT4JLT.dll and MSJTOR35.dll files from this location to the directories indicated below in the REGSVR32 commands.
-
Register the files in the following order:
REGSVR32.EXE C:\WINDOWS\SYSTEM\MSJT4JLT.DLL (WINNT\SYSTEM32 for Windows NT)
REGSVR32.EXE "C:\PROGRAM FILES\COMMON FILES\SYSTEM\OLE DB\MSJTOR35.DLL"
If these steps do not resolve the problem, continue with the Trouble-Shooting Microsoft Jet section.
Trouble-Shooting Microsoft Jet
If you have reached this step, then you should be experiencing problems with Microsoft Access, the Visual Basic data control, the VISDATA add-in, other applications, and your own DAO, RDO, and ADO code.
Core Jet Files
-
In order for Microsoft Jet to operate, you need a minimum of the following files installed on your computer, all in the C:\WINDOWS\SYSTEM directory (WINNT\SYSTEM32 for Windows NT):
MSJET35.dll
MSJTER35.dll
MSJINT35.dll
VBAJET32.dll
EXPSRV.dll (this was introduced with VBAJET32.DLL 6.x versions)
-
The Microsoft Jet registry keys are given in the Microsoft Jet Registry Settings section at the end of the article. Verify the registry keys exist. If not, the section gives instructions on creating them via a .reg file.
-
Once these steps cave been completed, you should be able to use Microsoft Jet to open Microsoft Jet 3.x database files. If you still have problems, some of the dependencies may be out of date. You can update them as detailed in the next section.
Jet Dependencies
Microsoft Jet has a number of file dependencies:
MSVCRT.dll
OLEAUT32.dll
Older versions of OLEAUT32.dll especially can be problematic. The EXPSRV.dll will not work properly with older versions. You can obtain the latest version of these DLLs by downloading the latest Microsoft Data Access Components from the Web. If you need the 3.5 version of the Microsoft Access ODBC drivers, you will have to restore them, as detailed in the Microsoft Access ODBC Drivers section earlier in the article, after upgrading the Microsoft Data Access Components.
Jet Installable ISAM Drivers
If your application uses Jet 2.x or earlier MDB files, dBase files, Excel spreadsheets, or any of the other installable ISAM file formats, then you need to install one or more of the following files to the WINDOWS\SYSTEM (WINNT\SYSTEM32 for Windows NT) directory:
MSRD2X35.dll Jet 2.x IISAM
MSEXCL35.dll Excel IISAM
MSEXCH35.dll Exchange IISAM
MSLTUS35.dll Lotus 123 IISAM
MSPDOX35.dll Paradox IISAM
MSTEXT35.dll Text file IISAM
MSXBSE35.dll dBase/FoxPro IISAM
The registry keys are given in the Microsoft Jet Registry Settings section at the end of the article. Verify the registry keys exist. If not, the section gives instructions on creating them through a .reg file.
You can also register them with the following commands:
REGSVR32.EXE C:\WINDOWS\MSRD2X35.dll
REGSVR32.EXE C:\WINDOWS\MSEXCL35.dll
REGSVR32.EXE C:\WINDOWS\MSEXCH35.dll
REGSVR32.EXE C:\WINDOWS\MSLTUS35.dll
REGSVR32.EXE C:\WINDOWS\MSPDOX35.dll
REGSVR32.EXE C:\WINDOWS\MSTEXT35.dll
REGSVR32.EXE C:\WINDOWS\MSXBSE35.dll
Jet Profiles
If you use custom Jet profiles, the following article provides more information:
Q173646 HOWTO: Use a Custom Jet Profile to Alter Data Access Behavior
REFERENCES
Microsoft Jet Database Engine Programmer's Guide, Second Edition
© Microsoft Corporation 1999, All Rights Reserved. Contributions by Malcolm Stewart, Microsoft Corporation
Additional query words:
Keywords : kbMDAC kbVBp500 kbVBp600 kbGrpVBDB kbDSupport kbMDAC210SP2 kbMDAC250
Version : WINDOWS:1.5,2.1 SP2,2.5,5.0,6.0
Platform : WINDOWS
Issue type : kbhowto
|