Home > Articles

SQL Server XML in ADO.NET

  • Print
  • + Share This
SQL Server 2000 and ADO.NET work together to provide rich, end-to-end support for XML in .NET applications. Scott Loban demonstrates how to retrieve query results as a well-formed XML document using SQL Server 2000's FOR XML EXPLICIT syntax.
Like this article? We recommend

Like this article? We recommend

SQL Server XML in ADO.NET

This article illustrates a solution to a common requirement in .NET solutions architectures: the retrieval of persisted data as XML. The approach demonstrated in this article is to query a SQL Server 2000 data store through an ADO.NET data access layer (see Figure 1). In addition, the query results are returned natively from SQL Server as a well-formed XML document.

Figure 1 Data services architecture.

Role of XML in .NET

XML is one of the most fundamental of the core technologies in the Microsoft .NET architecture. Microsoft .NET is an architecture for implementing distributed applications that cross the traditional boundaries between organizations and their information technology infrastructures. These boundaries include security, heterogeneous computing platforms, and diverse programming languages.

The key elements required for implementing applications that work across these boundaries are communications and data representation. Today, XML is the technology of choice for data representation in such applications. XML is an open standard for structured, self-describing data representation. Because it is an open standard, XML is well positioned for cross-platform, language-neutral implementation.

  • + Share This
  • 🔖 Save To Your Account