PRB: Run-Time Error When You Use SQLXML 2.0 with ADO to Execute an Updategram (323920)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
- ActiveX Data Objects (ADO)
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
This article was previously published under Q323920 SYMPTOMSIf you use Microsoft SQLXML 2.0 with ActiveX Data Objects
(ADO) to execute an updategram that specifies an XML Schema definition language
(XSD) schema, and the SQLXML Version property of the connection object is set to a default value, you
receive the following error message in Microsoft Visual Basic 6.0:
Run-time error '-2147217887 (80040e21)': Specified attribute or element
('ElementName') does not have a corresponding
mapping in the schema, and no overflow field defined. CAUSE This behavior occurs because the SQLXML Version property is not set to "SQLXML.2.0".
By default, the SQLXML Version property is set to the default value when you use the Microsoft
OLE DB Provider for SQL Server (SQLOLEDB). The default value of this property
uses the SQLXML feature that the Sqlxmlx.dll file provides. This .dll file is
included with SQLXML 1.0 and Sqlxml2.dll is included with SQLXML
2.0.WORKAROUNDTo use the Sqlxml2.dll file with SQLOLEDB, you must set the SQLXML Version property to "SQLXML.2.0". To do so, uncomment the following line
from the Visual Basic code in step 2 of "Steps to Reproduce the Behavior" in
the "More Information" section.
conn.Properties("SQLXML Version") = "SQLXML.2.0" REFERENCESFor more information about updategrams, see the following
SQLXML 2.0 documentation article "Executing an Updategram Using ADO" for an
equivalent XML-Data Reduced (XDR) schema: For more information about how to retrieve XML documents by using
FOR XML on the client side, see the SQLXML 2.0 documentation article,
"Architecture of Client-Side and Server-Side XML Formatting:"
Modification Type: | Major | Last Reviewed: | 12/5/2003 |
---|
Keywords: | kberrmsg kbprb KB323920 kbAudDeveloper |
---|
|