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 INFORMATION
There 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:
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.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
Keywords : kbsetup kbDatabase kbMFC kbODBC kbVC |
Last Reviewed: July 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |