FIX: Double-Byte Character Set Insertion May Fail with Error 2627 (176479)



The information in this article applies to:

  • Microsoft SQL Server 6.0
  • Microsoft SQL Server 6.5

This article was previously published under Q176479
BUG #: 17436 (Windows: 6.50)

SYMPTOMS

A double-byte character set (DBCS) insertion may fail with error 2627 when SQL Server is configured with the code page 850 Multilingual character set and sort order 42 (dictionary order, case-insensitive sort order). The following scripts demonstrate this problem:
CREATE TABLE t
   (
    aChar VARCHAR (2) PRIMARY KEY CLUSTERED,
    code BINARY(2)
   )
   GO

   SET NOCOUNT ON
   DECLARE @code BINARY(2)
   DECLARE @aChar VARCHAR(2)
   SELECT @code = 0x88a4
   WHILE @code < 0x88a6
   BEGIN
     SELECT @code
     SELECT @aChar = convert(VARCHAR(2), @code)
     SELECT @aChar
     INSERT t (aChar, code) VALUES (@aChar, @code)
     SELECT @code = @code + 1
   END
				

WORKAROUND

To work around this problem, use another code page.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbenv kbfix KB176479