views:

128

answers:

1

When inserting text into a TEXT column in SQL Server using ADO, i get the error:

Code page translations are not supported for the text data type. From: 1257 To: 1252.

Now it is true that i've changed my Windows code page to 1257 (Estonian).

My question is: How does SQL Server know what code page i'm running in?

All strings sent to and from the server are sent as wide (unicode) strings. At the server, SQL Server is then forced to stuff the unicode string into a TEXT (not NTEXT) column. The text column is set to use collation code page 1252.

There are no characters in the source string that are outside of the Windows 1252 code page. Even if there were, how does SQL Server know i'm running code page 1257?

i've tried profiling my connection to SQL Server, and i see nothing that looks like the client identifying its code page with the server.

+1  A: 

I hope I'm not correct and this is pre-SP3 SQL Server 2000...

Fixed in SP3, see KB 317956

gbn
You are, unfortunatly, right.i have no idea how this recently installed virtual server could still be at RTM after all these days...(v 8.00.194)
Ian Boyd
Even though i'm still curious as to how this problem is happening - if Microsoft itself wouldn't explain in their KB article, i doubt i'll ever see an explanation. +1, answer.
Ian Boyd
RTM? install SP4 and see what happens... it's a bug fixed about 7 years ago in a 10 year old product
gbn
Yeah yeah yeah. Tonight, after 5pm.
Ian Boyd