FIX: Access Violation on OPENXML XPath Query with Large Text Node (310640)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q310640
BUG #: 450053 (SHILOH_BUGS)

SYMPTOMS

If you use OPENXML to return the contents of a text node that is larger than 8 KB and the data type is a sql_variant, the execution of the statement may generate the following error stack dump in the SQL Server error log and cause the connection to fail:
CUtRowset::GetPmo() line 226 + 3 bytes CXMLRowset::ConvertWszToTi(CXVariant * 0x64006c00, const CTypeInfo * 0x62002000, unsigned short * 0x20006500) line 707 + 20 bytes 75006f00()

RESOLUTION

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

WORKAROUND

To work around the problem, make sure that the column that the XPath populates with the data stream is a text, ntext, or image column.

STATUS

Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000.

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

MORE INFORMATION

Beginning with SQL Server 2000 Service Pack 2 (SP2), the error does not return an access violation but does generate the following error message:
Server: Msg 6625, Level 16, State 1, Line 61 Could not convert the value for OPENXML column '%column%' to %data% data type. The value is too long. Change the data type of this column to text, ntext or image.

Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbbug kbfix KB310640