XML and the SQL 2000 Server, Part 2 - Mapping Virtual Objects
(Page 2 of 7 )
In the configuration of the virtual directory, the virtual name to access database objects is dataObjects, as seen in this picture. Similarly the templates are stored in the virtual directory named Templates, and schema files in the folder Schema (local paths are shown in the first picture). It is using these virutal names that the database is accessed, as discussed later in the tutorial.
Queries Using for XML Clause
Again in Part 1, details of running queries in SQL 2000 Server's Query Analyzer were discussed. Most important to note were the facts that, depending on the clause used, both attribute-centric as well as element-centric representation of SQL Data formatted in XML can be returned. Since the data returned is only an XML fragment, it needs to be enclosed between root elements for it to become well formed. Furthermore, using the attribute XMLData for the for XML clause, an XML schema for the underlying data is returned together with the data.
Queries Over HTTP Consumers of data from remote locations can access data using the HTTP protocol in several ways, including direct querying as well as Web services. Querying over HTTP can be carried out in a couple of different ways:
- Encoded SQL in the URL of the Virtual Directory
- Execute stored templates
- Directly acessing the database objects
Next: Using Select Queries in URL >>
More MS SQL Server Articles
More By Jayaram Krishnaswamy