The odbccmpt utility enables or disables the 6.5 ODBC compatibility option for an ODBC application executable file.
odbccmpt file_name [ -d ]
Only specify the names of ODBC applications written for Microsoft® SQL Server™ version 6.5 or earlier. Do not specify the name of the executable file for:
The 6.5 ODBC compatibility option sets certain behaviors of the 3.7 SQL Server ODBC driver to be compatible with earlier SQL Server ODBC drivers. This is only needed when using the 3.7 SQL Server ODBC driver and connecting to SQL Server 7.0 using applications developed with earlier versions of the SQL Server ODBC driver. The 6.5 ODBC compatibility option can be turned on for applications using either the ODBC 2.x or ODBC 3.x API.
odbccmpt does not need to be run for applications connecting to earlier versions of SQL Server using the 3.7 SQL Server ODBC driver. The 3.7 driver automatically runs in compatibility mode when it connects to earlier versions of SQL Server. odbccmpt does not need to be run for applications using earlier versions of the SQL Server ODBC driver connecting to SQL Server 7.0. SQL Server 7.0 automatically treats any application using the earlier drivers as a 6.5-level application.
Enabling the 6.5 ODBC compatibility option for an application causes the application to be treated as a 6.5-level application. The setting enables these changes in the behavior of the 3.7 SQL Server ODBC driver when it connects to SQL Server 7.0:
This truncation may affect additional operations, such as preventing SQLSetPos updates referencing text and image columns.
Catalog results show all bit columns as NOT NULL because bit columns did not support null values in SQL Server 6.5.
The 6.5 ODBC compatibility option can only be set at the level of an executable file. It cannot be set for individual DLLs.
When odbccmpt is run to enable the 6.5 ODBC compatibility option, it creates a registry key:
HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
MSSQLServer
Client
ODBCAppCompat
file_name:REG_SZ:6.5
When odbccmpt is run with the -d parameter, this key is removed. No error message is returned if odbccmpt is run with the -d parameter and there is no registry key for file_name.
Whenever the 3.7 SQL Server ODBC driver connects to SQL Server 7.0, it checks the registry for a key matching the name of the executable file for the application. If a match is found, the driver enables the 6.5 ODBC compatibility option. If no match is made, the 6.5 ODBC compatibility option is not enabled.
Note Most ODBC applications can switch without change from the 2.65 SQL Server ODBC driver to the 3.7 driver. odbccmpt is a migration aid to assist with moving applications from SQL Server version 6.5 to version 7.0. It should be used only for applications having problems in moving to SQL Server 7.0 and the 3.7 SQL Server ODBC driver. odbccmpt should only be used until the application has been corrected.
odbccmpt MyApp
odbccmpt MyApp -d