Communicating with SQL Server over the Web

The FOR XML clause can be issued from traditional means of connecting to SQL Server, such as through the SQL Server Query Analyzer or programmatically through standard database libraries like ADO for Windows platforms and JDBC for Java. However, each of the remaining methods of access require a different form of communication. To issue a query with the other methods requires communication through the protocol of the Web, HTTP. Therefore, before I go on to describe other ways in which you can query a database and receive XML data in response, let me diverge a bit and describe how to Web-enable SQL Server databases.

HTTP is the standard protocol that Web browsers and Web servers use to communicate across ...

Get XML and SQL: Developing Web Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.