Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 257670 - Last Review: October 7, 2005 - Revision: 2.3
FIX: OLE DB Provider for SQL Server May Cause Incorrect Code Conversion of Some Characters
This article was previously published under Q257670
IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986Â
(http://kbalertz.com/Feedback.aspx?kbNumber=256986/EN-US/
)
Description of the Microsoft Windows Registry
The Microsoft Data Access Components (MDAC) 2.1 or later version of the Microsoft OLE DB Provider for SQL Server may not store some ASCII and extended characters correctly if the code page for SQL Server does not match the client's code page. Instead, the characters are stored as "???".
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 explicitly 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.
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
------------------------------------------------------------------
01/19/00 05:39a 07.01.0767 540,944 Sqloledb.dll x86
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
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.
- Start the Registry Editor (Regedt32.exe).
- Locate the following key in the registry:
HKLM\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo\Autotranslate
- 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 as Value name.
Value 0x00000002 enables Autotranslation for connections
to the specified SQL server as Value name.
- Quit the Registry Editor.
- Restart the client application.
If Autotranslation is specified in either the OLE DB initialization string or as a initialization property, this overrides the setting of the Registry key if it exists.
REFERENCES
For additional information about Autotranslation, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
234748Â
(http://kbalertz.com/Feedback.aspx?kbNumber=234748/EN-US/
)
PRB: SQL Server ODBC Driver Converts Language Events to Unicode
257668Â
(http://kbalertz.com/Feedback.aspx?kbNumber=257668/EN-US/
)
FIX: SQL Server ODBC Driver May Cause Incorrect Code Conversion of Some Characters
APPLIES TO
- Microsoft OLE DB Provider for SQL Server 7.01
- Microsoft OLE DB Provider for SQL Server 7.0
- Microsoft Data Access Components 2.1
| kbbug kbdatabase kbfix kbmdac250fix kbqfe KB257670 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate