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 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.