Microsoft KB Archive/301382

= BUG: DTS May Transfer the Unnecessary Lead Byte of a Double-Byte Character =

Article ID: 301382

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q301382



BUG #:101191 (SQLBUG_70)



SYMPTOMS
Data Transformation Services (DTS) may transfer the unnecessary lead byte of a double-byte character (DBCS) when the following conditions are met:
 * You use Microsoft OLE DB Provider for SQL Server to connect to the destination server.
 * The column is a character data type (varchar or char).
 * The import data is truncated to fit into the column.



WORKAROUND
Use the Microsoft ODBC Driver for SQL Server to connect to destination server.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.



Steps to Reproduce Behavior
You can use the following steps to demonstrate the truncation:  Add codepage932 (Japanese) from the Microsoft Windows NT LangPack folder. Or, you can use the Microsoft Windows Japanese NT version. Install Microsoft SQL Server or rebuild the master database as cp932 with a binary sort order.  Execute the following queries: create table t1 (c1 int, c2 char(4)) go create table t2 (c1 int, c2 char(3)) go insert into t1 values ( 1, 0x82A082A0) go  Execute the DTS Export/Import Wizard with following option:

Destination : Microsoft OLE DB Provider for SQL Server

Table Copy or query : Use a query to specify the data to transfer

SQL query statement : SELECT c1,c2 FROM t1

Destination table name : t2

Run DTS package immediately : Yes

  Execute the following query: select convert(binary,c2) from t2 where c1 = 1 go The result that is returned is: <pre class="fixed_text">c2 -- 0x82A082000000000000000000000000000000000000000000000000000000 Use the Microsoft ODBC Driver for SQL Server. The result that is returned is: <pre class="fixed_text">c2 -- 0x82A000000000000000000000000000000000000000000000000000000000 </li></ol>

Keywords: kbbug kbpending KB301382

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.