Article ID: 263247 - View products that this article applies to.
This article was previously published under Q263247
If you have an XML string or document you may use it to open an ActiveX Data Objects (ADO) recordset. You can do this by using the Microsoft ADO 2.5 Stream object and the new XML integration features in ADO.
This article describes the mechanism required to load the following into an ADO 2.5 recordset:
To open an XML string as a recordset, use the code that follows. Make sure that your Visual Basic project has the appropriate references to the Microsoft ActiveX Data Access Components 2.5 Library so that ADO can be used as shown.
Please note that the preceding code accepts a String.
The following code accepts a DOM object as the source for the recordset. Note that the Stream object is not needed:
After you open the recordset in any of these ways, you can use the recordset as any other disconnected recordset.
Note that the current position, AbsolutePage and other navigation properties are not stored in the XML document; therefore, the newly opened recordset is always positioned at the first row.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
309702For more information about ADO, see to the following Web site:
(http://support.microsoft.com/kb/309702/EN-US/ )How To Read XML Data into a DataSet by Using Visual Basic .NET
http://msdn.microsoft.com/en-us/data/aa937729.aspx(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Edward A. Jezierski, Microsoft Corporation.
Article ID: 263247 - Last Review: July 1, 2004 - Revision: 5.4