How To Retrieve XML Data by Using a SQL XML Query in a Visual Basic Client (271620)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft SQL Server 2000 (all editions)
- Microsoft XML 2.6
- Microsoft XML 4.0
This article was previously published under Q271620 SUMMARY If you run an ADODB command stream and specify SQL SELECT with the FOR XML AUTO clause, an XML document stream is fetched from SQL Server and
displayed in the Visual Basic Intermediate window. You must set the
following properties for the Properties collection of the ADODB.Command object:
- Output Stream. This property designates where the resulting XML data stream
will be piped.
- Dialect. The dialect defines the syntax and the general rules that the
provider uses to parse the string or the stream. By setting the command
language dialect, you specify how the Microsoft OLE DB Provider for SQL Server
interprets the command text that is received from ActiveX Data Objects (ADO).
The dialect is specified by a globally unique identifier (GUID) and is set by
using the Dialect property of the Command object.
REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
316364
How To Quote a Member of the Connection String in ADO.NET By Using
Visual Basic .NET
307224 How To Use
XML in Connected and Disconnected ADO.NET Applications
For information about SQL 2000 and mapping schema,
see SQL Server Books Online. For XML, please see the XML information
on MSDN on the following Microsoft Web site:
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbhowto KB271620 |
---|
|