Using XmlReader

In Hour 8, “Using the DataReader and DataAdapter,” you learned how to use the DataReader object to handle a stream of data returned from Microsoft SQL Server. The XmlReader object is a close cousin of the DataReader object and is used in much the same way, with XML. In the next few sections, you'll learn about some new features of Microsoft SQL Server 2000 and the XmlReader object.

Using XmlReader with SQL Server 2000

Microsoft SQL Server 2000 ships with numerous improvements and features not present in previous versions of SQL Server. One of my favorite new additions found in SQL Server 2000 is the ability to retrieve data in native XML format. If you add the keywords “FOR XML” to the end of your database query, the server will ...

Get Sams Teach Yourself ADO.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.