FIX: Text Field Data Truncated When Double Byte Character Spans Page Break (259956)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q259956
BUG #: 57854 (SQLBUG_70)

SYMPTOMS

When you insert or update a text field, which has mixed single and double byte characters, you may notice truncation of data at the end of the text field.

WORKAROUND

Use UNICODE text columns instead of Double Byte Character set columns. To do so, define the text columns as NTEXT rather than TEXT.

STATUS

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

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

MORE INFORMATION

The amount of data inserted is greater than two pages (16160 bytes). A double byte character spans the page break between the first and second page. For instance, if you use codepage 932, there is a valid Japanese character with the hex code 0x9a8e (this is byte swapped, the 8e byte is actually the first byte). If this character is placed in the text field so that the 8e byte is the last byte on the first page of text, and a 9a byte is the first byte on the second page of text, then the truncation occurs at the end of the second page of data, and all the subsequent data in the field is lost.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix kbQFE kbSQLServ700sp2fix KB259956