In addition to copying the ODBC driver files onto disk, your installation program must also make a set of registry entries to install the ODBC driver properly.
The SQL Anywhere installer makes changes to the Windows Registry to identify and configure the ODBC driver. If you are building an installation program for your end users, you should make the same registry settings.
The simplest way to do this is to use the self-registering capability of the ODBC driver. You use the regsvr32 utility on Windows or the regsvrce utility on Windows Mobile. Note that for 64-bit versions of Windows, you can register both the 64-bit and 32-bit versions of the ODBC driver. By using the self-registering feature of the ODBC driver, you are ensured that the proper registry entries are created.
You should give custom names to your 32-bit and 64-bit versions of the SQL Anywhere ODBC driver. This facilitates the installation and registration of multiple independent copies of the SQL Anywhere ODBC driver using regsvr32, and prevents your registry settings from being overwritten if another application install registers the SQL Anywhere ODBC driver.
To customize the names of your 32-bit and 64-bit versions of the ODBC driver, open a command prompt and rename them as follows where custom-name is a meaningful string such as your company name:
ren "%SQLANY12%\bin32\dbodbc12.dll" dbodbc12custom-name.dll ren "%SQLANY12%\bin64\dbodbc12.dll" dbodbc12custom-name.dll |
Make sure to preserve the dbodbc12 prefix when renaming the files.
To register the 32-bit and 64-bit versions of the ODBC driver using the custom names, issue the following commands:
regsvr32 "%SQLANY12%\bin32\dbodbc12custom-name.dll" regsvr32 "%SQLANY12%\bin64\dbodbc12custom-name.dll" |
You can use the regedit utility to inspect the registry entries created by the ODBC driver.
The SQL Anywhere ODBC driver is identified to the system by a set of registry values in the following registry key:
HKEY_LOCAL_MACHINE\ SOFTWARE\ ODBC\ ODBCINST.INI\ SQL Anywhere 12 |
Sample values for 32-bit Windows are shown below:
Value name | Value type | Value data |
---|---|---|
Driver | String | C:\Program Files\SQL Anywhere 12\bin32\dbodbc12custom-name.dll |
Setup | String | C:\Program Files\SQL Anywhere 12\bin32\dbodbc12custom-name.dll |
There is also a registry value in the following key:
HKEY_LOCAL_MACHINE\ SOFTWARE\ ODBC\ ODBCINST.INI\ ODBC Drivers |
The value is as follows:
Value name | Value type | Value data |
---|---|---|
SQL Anywhere 12 - custom-name | String | Installed |
For 64-bit Windows, the 32-bit ODBC driver registry entries ("SQL Anywhere 12 - custom-name" and "ODBC Drivers") are located under the following key:
HKEY_LOCAL_MACHINE\ SOFTWARE\ Wow6432Node\ ODBC\ ODBCINST.INI |
To view these entries, you must be using a 64-bit version of regedit. If you cannot locate Wow6432Node on 64-bit Windows, then you are using the 32-bit version of regedit.
If you are using a third-party ODBC driver on an operating system other than Windows, consult the documentation for that driver on how to configure the ODBC driver.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |