|
|
2.3 Creating a Mimer ODBC Stand-alone Installation Package
The Mimer ODBC stand-alone installation package is an alternative to the Mimer SQL client installation described above.
This method means that you write a Setup program that explicitly handles the Mimer ODBC components and calls a number of Microsoft ODBC functions for installing, uninstalling and upgrading.
The Mimer ODBC stand-alone installation has the following characteristics:
- Installs a complete Mimer ODBC driver.
- Installs minimal support for managing Mimer data sources and remote databases using the ODBC Administrator.
- Does not install or upgrade Microsoft ODBC or support for Embedded SQL and JDBC. Nor does it install any Mimer SQL tools or documentation.
When you choose this method, you should consider the following:
- Your Setup program must manage upgrading the Mimer ODBC components by removing the old components and then installing the new components.
- You are responsible for installing a suitable version of Microsoft ODBC and Microsoft libraries (Visual C++ run-time and Common Controls) required by the Mimer ODBC driver.
2.3.1 Including the Mimer ODBC Components
In your Setup program, you must include the following Mimer ODBC components:
- Mimodb32.dll, the Mimer ODBC driver
- Mimset32.dll, the Mimer ODBC data source and database administration.
You obtain these components by running a typical Mimer SQL installation and then copying the components from the directory in which you installed Mimer SQL.
In your Setup program, you install the components by using calls to SQLInstallDriverEx and SQLConfigDriver.
SQLInstallDriverEx adds information about the driver to the ODBCINST.INI entry in the system information and increments the driver's UsageCount by 1.
SQLConfigDriver completes the Mimer SQL installation by performing Mimer SQL specific functions such as update of Mimer SQL specific system information.
The arguments of these functions are further described in ODBC Supplementary Information.
2.3.1.1 ODBC Stand-alone Installation Example
The following C example will perform an ODBC stand-alone installation:
rc = SQLInstallDriverEx( "MIMER\0Driver=Mimodb32.dll\0Setup=Mimset32.dll\0" "SQLLevel=1\0" "FileUsage=0\0" "DriverODBCVer=03.51\0" "ConnectFunctions=YYY\0" "APILevel=2\0" "CPTimeout=60\0\0", "C:\\Program Files\\MIMER82", pathout, 255, NULL, ODBC_INSTALL_COMPLETE, &ucount); if (!rc) { rc = SQLInstallerError(1,&errcod,errtxt,1000,&errlen); printf("Error: %s\n",errtxt); } rc = SQLConfigDriver(NULL,ODBC_INSTALL_DRIVER,"MIMER", NULL,pathout,255,&meslen); if (!rc) { rc = SQLInstallerError(1,&errcod,errtxt,1000,&errlen); printf("Error: %s\n",errtxt); }2.3.2 Removing the Mimer ODBC Components
You remove the Mimer ODBC components by using calls to SQLRemoveDriver and SQLConfigDriver.
SQLRemoveDriver deletes information about the driver from the ODBCINST.INI entry in the system information and decrements the driver's UsageCount by 1.
SQLConfigDriver completes the removal of the components by performing Mimer SQL specific functions such as updating Mimer SQL specific system information.
The arguments to these functions are further described in ODBC Supplementary Information.
2.3.2.1 ODBC Stand-alone Removal Example
The following C example will remove Mimer ODBC components:
rc = SQLConfigDriver(NULL,ODBC_REMOVE_DRIVER,"MIMER",NULL, pathout,255,&meslen); if (!rc) { rc = SQLInstallerError(1,&errcod,errtxt,1000,&errlen); printf("Error: %s\n",errtxt); } rc = SQLRemoveDriver("MIMER",0,&ucount); if (!rc) { rc = SQLInstallerError(1,&errcod,errtxt,1000,&errlen); printf("Error: %s\n",errtxt); }2.3.3 External Dependencies
Note: You are responsible for installing a suitable version of Microsoft ODBC and Microsoft libraries (Visual C++ run-time and Common Controls) required by the Mimer ODBC driver.
Microsoft ODBC version 3.51 is recommended for a stand-alone installation of Mimer ODBC version 8.2.
The following Microsoft DLLs are also required:
File name
Version
Description
Msvcrt.dll Comctl32.dllMsvcrt.dll is the Visual C++ run-time library distributed with Visual C++ 6.0.
Comctl32.dll can be installed by executing 50comupd.exe which can be retrieved from Microsoft.
The redistribution of Comctl32.dll and download of 50comupd.exe file is further described in the Microsoft Knowledge Base article Q186176 available at http://support.microsoft.com/support/kb/articles/Q186/1/76.ASP.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|