T
Tor Inge Rislaa
By using Virtual Directory I can return XML Data to my browser by either
using Transact SQL directly in my URL as below:
http://localhost/MyVirualDirector?sql=SELECT+ CustomerID+ CompanyName +FROM+
Customers +FOR+XML+AUTO,+ELEMENTS&root= MyList
Or by include my query within an XML and call it trough my Virual Director
as:
http://localhost/TIR/ MyList.xml
MyList.xml typed out:
<?xml version="1.0" encoding="UTF-8"?>
<MyList xmlns:sql='urn:schemas-microsoft-com:xml-sql'>
<sql:query>
SELECT CustomerID, CompanyName
Customers
XML AUTO, ELEMENTS
</sql:query>
</MyList>
I am wondering if it is possible to get a call (e.g.
http://localhost/MyList.aspx) to an ASP.NET page to return XML to my browser
as above. And if it is possible can I as well pass some parameters to be
variables in the Transact SQL within the .aspx
The method I am using to day needs some action from my Internet Service
Provider like applying the virtual directory and mapping to my template XML
file. I would like to include my connection settings within my .aspx so that
I have full control over the application.
Anyone having a little example on how to do this
TIRislaa
using Transact SQL directly in my URL as below:
http://localhost/MyVirualDirector?sql=SELECT+ CustomerID+ CompanyName +FROM+
Customers +FOR+XML+AUTO,+ELEMENTS&root= MyList
Or by include my query within an XML and call it trough my Virual Director
as:
http://localhost/TIR/ MyList.xml
MyList.xml typed out:
<?xml version="1.0" encoding="UTF-8"?>
<MyList xmlns:sql='urn:schemas-microsoft-com:xml-sql'>
<sql:query>
SELECT CustomerID, CompanyName
Customers
XML AUTO, ELEMENTS
</sql:query>
</MyList>
I am wondering if it is possible to get a call (e.g.
http://localhost/MyList.aspx) to an ASP.NET page to return XML to my browser
as above. And if it is possible can I as well pass some parameters to be
variables in the Transact SQL within the .aspx
The method I am using to day needs some action from my Internet Service
Provider like applying the virtual directory and mapping to my template XML
file. I would like to include my connection settings within my .aspx so that
I have full control over the application.
Anyone having a little example on how to do this
TIRislaa