Article ID: 271775 - Last Review: August 9, 2004 - Revision: 4.4 SAMPLE: How To Retrieve Relational Data Using OpenXML with ADO in Visual C++This article was previously published under Q271775 On This PageSUMMARY OpenXML.exe demonstrates how to retrieve an ADO Recordset from an input XML document by using the OpenXML feature in SQL
Server 2000. MORE INFORMATIONThe
following file is available for download from the Microsoft Download
Center: OpenXML.exe
(http://download.microsoft.com/download/mdac26/utility/2.6/win98/en-us/openxml.exe)
Release Date:
10-19-2001For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
The OpenXML.exe file contains the following files:
Collapse this table
OpenXML.exe is a SQL Server 2000 extension to Transact-SQL that allows stored procedures to process XML and generate rowsets from the data for use by Transact-SQL statements. In this sample, an ADO client passes an XML document to a stored procedure. The stored procedure runs a SELECT statement, which generates a rowset. This rowset is then returned to the client as an ADO Recordset. This sample creates a stored procedure named SP_OpenXML_Example on a SQL Server 2000 database and passes an XML document XMLDoc.xml to the stored procedure. The stored procedure processes the document using OpenXML and returns an ADO Recordset back to the client. Additionally, the SP_OpenXML_Example stored procedure contains calls into the system stored procedures sp_xml_preparedocument and sp_xml_removedocument that load and unload the document from memory respectively. The SP_OpenXML_Example stored procedure is doing the following things:
Steps to Run the Sample
REFERENCESFor additional information on XPATH query and XML, click the
article numbers below to view the articles in the Microsoft Knowledge Base: 272177
(http://support.microsoft.com/kb/272177/EN-US/
)
SAMPLE: How to Retrieve XML Data Using an XPATH Query in ATL OLE DB
272185
(http://support.microsoft.com/kb/272185/EN-US/
)
SAMPLE: How to Retrieve Data Using a SQL XML Query in ATL OLE DB
271780
(http://support.microsoft.com/kb/271780/EN-US/
)
SAMPLE: How To Retrieve XML Data using a SQL XML Query with ADO in Visual C++
271782
(http://support.microsoft.com/kb/271782/EN-US/
)
SAMPLE: How To Retrieve XML Data Using an XPATH query with ADO in Visual C++
272180
(http://support.microsoft.com/kb/272180/EN-US/
)
SAMPLE: How to Retrieve XML Data Using a Template File with ADO in Visual C++
SQL Server 2000 Books OnLineADO 2.6 Documentation APPLIES TO
| Article Translations
|
Back to the top
