HOWTO: Determine Which ODBC Files to ShipLast reviewed: June 26, 1997Article ID: Q129459 |
The information in this article applies to:
SUMMARYThis article discusses how to determine which ODBC and ODBC driver files to ship with a Visual C++ application that uses the MFC database classes. This information is more specific than that found in the REDISTRB.WRI file.
MORE INFORMATIONThere are two categories of files that must be shipped with an application that uses the MFC database classes:
ODBC ComponentsThe set of ODBC components that you need to ship depends on the operating system supported and on whether the application is a 16-bit or a 32-bit application. The possible combinations are described in more detail in Appendix A of the ODBC SDK Guide (ISBN #:1-55615-658-8). The four possible combinations and their required ODBC component files are:
16-bit Application with 16-bit Drivers (Windows 3.1 and Windows NT) ------------------------------------------------------------------- ODBC.DLL 16-bit driver manager ODBCCURS.DLL 16-bit cursor library ODBCINST.DLL 16-bit installer DLL ODBCADM.EXE 16-bit administrator ODBCINST.HLP installer help file CTL3DV2.DLL 16-bit ctl3d DLL 16-bit Application with 32-bit Drivers (Windows NT) --------------------------------------------------- ODBC.DLL 16-bit driver manager ODBCCURS.DLL 16-bit cursor library ODBC16GT.DLL 16-bit ODBC generic thunking DLL ODBC32GT.DLL 32-bit ODBC generic thunking DLL ODBCINST.DLL 16-bit installer DLL ODBCCP32.DLL 32-bit installer DLL ODBCADM.EXE 16-bit administrator ODBCAD32.EXE 32-bit administrator ODBCINST.HLP installer help file DS16GT.DLL 16-bit driver setup generic thunking DLL CTL3D32.DLL 32-bit ctl3d DLL 32-bit Application with 16-bit Drivers (Win32s) ----------------------------------------------- ODBC32.DLL 32-bit thunking driver manager ODBCCURS.DLL 16-bit cursor library ODBC.DLL 16-bit driver manager ODBC16UT.DLL 16-bit ODBC universal thunking DLL ODBCCP32.DLL 32-bit thinking installer DLL ODBCINST.DLL 16-bit installer DLL CPN16UT.DLL 16-bit installer universal thunking DLL ODBCADM.EXE 16-bit administrator ODBCINST.HLP installer help file CTL3DV2.DLL 16-bit ctl3d DLL NOTE: The Win32s components are included in the \WIN32S\ODBC directory on the Visual C++ version 2.X and 4.X CDs. 32-bit Application with 32-bit Drivers (Windows NT) --------------------------------------------------- ODBC32.DLL 32-bit driver manager ODBCCR32.DLL 32-bit cursor library ODBCCP32.DLL 32-bit installer DLL ODBCAD32.EXE 32-bit administrator ODBCINST.HLP installer help file CTL3D32.DLL 32-bit ctl3d DLL ODBC DriversThe files that make up the different ODBC drivers are not documented completely in any one place. Because of this lack of documentation and also because these files are prone to change in the future, a good way to determine which files are needed to redistribute a particular driver is to use the ODBC.INF file for the setup program that initially installed the ODBC driver files. The advantage of using ODBC.INF is that it was actually used to install the ODBC drivers, therefore it is the source of a tested and working driver installation. For all versions of Visual C++ that ship ODBC components and drivers, ODBC.INF is located in the REDIST subdirectory. For example, suppose an application needs to install the Microsoft Access driver that ships with Visual C++ version 1.52a. In that case, you would look in the "[Microsoft Access Driver (*.mdb)]" of the ODBC.INF file. In this section, you will see a number of entries, one for each file that makes up the Microsoft Accesss driver. Each entry is on a single line that consists of comma-separated values. The second value in each line is the filename for that entry. Here is the first entry for the Microsoft Access driver section of ODBC.INF: "vbajet.dll" = 1, vbajet.dll,,,, 1994-11-18,,,,,,,,,, 1984,,,, 2.0.0.2420, In this case, you can see that the filename for this entry is VBAJET.DLL, so this is one of the files needed to redistribute the Microsoft Access driver. Another interesting field in this entry is the next to the last one (2.0.0.2420). This is the version number of the file. Going through all the entries in the Microsoft Access driver section, you can make a list of all the required files:
VBAJET.DLL STDOLE.TLB OLE2.REG MSJETERR.DLL MSJETINT.DLL OLE2PROX.DLL VAEN2.OLB OLE2CONV.DLL ODBCTL16.DLL COMPOBJ.DLL OLE2NLS.DLL ODBCJTNW.HLP OLE2DISP.DLL STORAGE.DLL ODBCJET.HLP TYPELIB.DLL ODBCJT16.DLL OLE2.DLL VBAR2.DLL MSAJT200.DLLNOTE: Many of these files are OLE2 DLLs. It is very important to do version checking when installing files on a new system. If there are newer versions of any of these files and you replace them with older versions, applications that depend on the newer versions may break.
REFERENCESODBC 2.0 SDK GUIDE, Appendix A, Developing 16- and 32-Bit Applications and Drivers (ISBN #:1-55615-658-8).
|
Additional query words: 2.50 2.51 2.52 2.52a 3.00 3.10 3.20
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |