Re: Incorrect code page conversion

From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 11/22/04


Date: Mon, 22 Nov 2004 22:47:36 +0000 (UTC)

Michael Bauers (MichaelBauers@discussions.microsoft.com) writes:
> I am seeing an incorrect conversion of data stored in SQL database with
> the CZECH_BIN collation. The character 0xEC gets translated to 0x65
> (lower ASCII e.)
>
> We are using ADO, but I suspect this is an OLE DB issue.
>
> The problem also results in a concurrency error on one machine. We
> believe that ADO thinks the data has been changed since the last access
> simply because its internal value for the data is different.
>
> The correct value is only seen on one box, and that is the only box
> running MDAC 2.8. It possible this was an error corrected in MDAC 2.8.

It is not really clear where the error occurs, but if I my guess, you
have an e-hacek in the database, and when it reaches the client, you
now have a plain accentless lowercase e. Also, I would guess that you
are not using Unicode, but varchar.

What is the ANSI code page on the various boxes? To me it sounds that
the box where things are working uses CP1251, whereas the other boxes
uses a code page that does not have e-hacek, for instance CP1252.

You can check the ANSI code page in the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP.

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: Please Help!How to write/read 7.5 K binary data to SQL database
    ... Essentially it is a binary type but allows ... to keep values bigger tan 8000 bytes. ... > Visual C++ 6.0, SQL Database, ADO. ...
    (microsoft.public.data.ado)
  • Best way to populate a form with a DataList link?
    ... have to learn a fair chunk of the .NET platform (VS, ADO, WebForms, C# ... the data is stored as a row in an SQL database table. ...
    (microsoft.public.dotnet.languages.csharp)
  • ADO ODBC CONNECTION STRING
    ... I have an access data base with linked tables from an Ms sql database. ... I am trying to use ADO in VBA to list the odbc connection string for each linked table. ... I have some code using DAO that can do this using the "connect" property of a tabledef object. ...
    (microsoft.public.data.ado)
  • Re: Write to a file
    ... >I want to read dada from SQL database and write it to a ... > ASCII comma delimited file. ... Convert an ADO Recordset to Text ... Convert Database Data Between Serveral Formats Using ADO ...
    (microsoft.public.vb.general.discussion)