devxlogo

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!

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

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.