DETAILS
<%
Response.ContentType = "text/xml"
Dim oCmd, sSQL
sSQL = "<root><sql:query xmlns:sql='urn:schemas-microsoft-com:xml-sql'>" & _
"Select Lastname, Firstname, City from Employees order by Firstname FOR XML AUTO </sql:query></root>"
Set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = ("Provider=sqlxmloledb.3.0;data provider=sqloledb;Data Source=SQL Server;user id=SQL user;password=password;Initial Catalog=database")
oCmd.CommandText = sSQL
oCmd.Dialect = "{5D531CB2-E6Ed-11D2-B252-00C04F681B71}"
oCmd.Properties("Output Stream") = Response
oCmd.Execute , , 1024
Set oCmd = Nothing
%>