Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: SQL Server ODBC Driver May Cause Incorrect Code Conversion of Some Characters


View products that this article applies to.

Symptoms

The Microsoft Data Access Components (MDAC) 2.1 or later version of the SQL Server ODBC driver may not store extended characters correctly if the code page for SQL Server does not match the client's code page. Instead, the characters are stored as "???".

↑ Back to the top


Cause

The SQL Server ODBC driver (version 3.70.0623 or later) and the OLE DB provider (version 7.01.0623 or later) translate character data from the client code page to the server code page automatically by default. The translation may cause a problem in ODBC or OLE DB applications that store extended characters, if the client application does not use the same code page as the server and the client does not explictly turn Autotranslation off when making the database connection.

To turn Autotranslation off when using the ODBC driver, add the attribute "AutoTranslate=no" in the ODBC connection string.

To turn the Autotranslation setting off when using the OLE DB provider, set the SSPROP_INIT_AUTOTRANSLATE property to VARIANT_FALSE. SSPROP_INIT_AUTOTRANSLATE is part of the provider-specific DBPROPSET_SQLSERVERDBINIT property set.

↑ Back to the top


Resolution

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next MDAC 2.1 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:
Date       Time      Version      Size      File name      Platform
-------------------------------------------------------------------
12/9/99    08:46a    3.70.0758    24,848    Odbcbcp.dll    x86
12/9/99    08:46a    3.70.0758   516,368    Sqlsrv32.dll   x86
				

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.


  1. Start the Registry Editor (Regedt32.exe).
  2. Locate the following key in the registry:
    HKLM\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo\Autotranslate
    					
  3. On the Edit menu, click Add Value, and then add the following registry value:
     Value Name: <SQL server name>
     Data Type: REG_DWORD
     
     Value 0x00000000 disables Autotranslation for connections 
                      to the specified SQL Server server as Value name.
    
     Value 0x00000002 enables Autotranslation for connections
                      to the specified SQL Server server as Value name.
    					
  4. Quit the Registry Editor.
  5. Restart the client application.
If Autotranslation is explicitly turned off in the client application, this overrides the setting of the Registry key if it exists. If the DSN has a setting for the Autotranslate option, it is not honored if a Registry key does not exist. However, if the Registry key does exist, the DSN setting is ignored and deleted. This is necessary because the DSN setting is not per server.

REFERENCES

For additional information about Autotranslation, click the article number below to view the article in the Microsoft Knowledge Base:
234748 PRB: SQL Server ODBC Driver Converts Language Events to Unicode
257670 FIX: OLE DB Provider for SQL Server May Cause Incorrect Code Conversion of Some Characters

↑ Back to the top


Keywords: KB257668, kbqfe, kbmdac250fix, kbfix, kbexcel123quattro, kbbug

↑ Back to the top

Article Info
Article ID : 257668
Revision : 4
Created on : 10/5/2005
Published on : 10/5/2005
Exists online : False
Views : 659