devxlogo

Retrieve SQL Server Results in XML through an HTTP Connection

Retrieve SQL Server Results in XML through an HTTP Connection

Beginning with SQL Server 2000, Microsoft added support to retrieve data from SQL Server databases by using an URL address. To do this, you must create a virtual root, that is, a virtual address that your Website visitors can see. To do that, use the ‘Configure SQL XML Support in IIS’ utility that comes with the SQL Server 2000 installation. Then, you can send queries by URL.

Example:

‘http://myWebServerName/myVirtualRootName?sql=SELECT+FirstName+FROM+Employees’

The results are in XML format, so there’s no ASP needed. The ‘+’ signs exist to substitute the normal spaces that, as you know, are forbidden from usage in URL addresses. Enjoy!

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist