Microsoft KB Archive/285006

= FIX: You receive error message 6603 or text data may be truncated when you select a text data type through the OPENXML provider in SQL Server 2000 =

Article ID: 285006

Article Last Modified on 9/26/2005

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft XML Parser 2.6
 * Microsoft Data Access Components 2.6

-



This article was previously published under Q285006



BUG #: 236142 (Shiloh_bug)



SYMPTOMS
When you select character data that is a Text data type through the OPENXML rowset provider, the text data may be truncated or you may receive the following error message:

Server: Msg 6603, Level 16, State 1

XML parsing error: System error: 265926.

If the text value tag in the XML code contains more than 3,956 characters but less than 7,907 characters, you receive the 6603 error message. If the value tag contains more than 7,907 characters, the text data is truncated silently.



SQL Server 2000
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to obtain the latest SQL Server 2000 service pack

MDAC
To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

300635 INFO: How to obtain the latest MDAC 2.6 service pack

Hotfix
Note The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 1.

The English version of this fix should have the following file attributes or later:

  Date        Version        Size    File name ---  01/23/2001  8.1.7123.0   688,912   Msxml2.dll 01/23/2001 8.1.7123.0    21,776   Msxml2a.dll 01/23/2001 8.1.7123.0    37,648   Msxml2r.dll 01/23/2001 8.1.7123.0    26,384   Xmlinst.exe If you are upgrading from the original released version of SQL Server 2000 to Microsoft SQL Server 2000 Service Pack 3 (SP3), this problem may occur. To resolve this problem, install the security update that is described in the following Microsoft Knowledge base article:

318202 MS02-008: XMLHTTP control in MSXML 2.6 can allow access to local files

The security update that is discussed in Microsoft Security Bulletin MS02-008 has the required files (version 8.2.8307.0).



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.

SQL Server 2000
This problem was first corrected in SQL Server 2000 Service Pack 1.

MDAC
This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.



Steps to reproduce the problem
  Create the stored procedure from the following script: /** Begin Script for reproducing the problem **/

DROP PROCEDURE test_openxml GO CREATE PROCEDURE test_openxml @i_xml text AS begin declare @hr  integer declare @hdoc integer

exec @hr = sp_xml_preparedocument @hdoc output,@i_xml

if @hr = 0 begin select datalength(value) from openxml(@hdoc,'root/data',1) with(value text) exec sp_xml_removedocument @hdoc end end GO EXEC test_openxml ' &quot;/> ' GO

/** End Script for reproducing the problem **/  Call this procedure and provide a valid XML string as parameter. The value of the data tag should contain at least 4,000 characters at the indicated location.

You either receive the 6603 error message or the OPENXML rowset provider truncates the text column after about 3,900 characters. The datalength function returns the actual length. The actual length is shorter than the string that is provided in the XML code.

Keywords: kbbug kbfix kbqfe kbsqlserv2000sp1fix kbmdac260sp1fix kbmsxmlnosweep kbhotfixserver KB285006

-

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

© Microsoft Corporation. All rights reserved.