Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a newbie primer on outputting xml via intra-net page 1

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
I have a simple intranet site where I output a simple list of data from sql-server 2005. It's in ASP, and I just generate the html in a loop via response.write, ouputting the html table.

Since sql-2005 can output xml, I'd like to try this but *without* creating a physical xml file.

So my question is, I'm not sure exactly how to do this.

I'm now at the point where I'm using the FOR XML clause and ouput the single string returned...this is where things don't look as expected. So I'm just looking to be pointed in the right direction for how to do this efficiently.
Thanks,
--Jim
 
One sure can consume the output of query in a seamless way. The idea is to instantiate an adodb.stream and assign it to the adodb.command "output stream" property. From there, you can direct the output stream to any xml parser by loading the string from the stream readtext method.

Here is the demonstration (may not be the best immediate suitable for asp server-side use, but its port to vbscript is near to straightforward):
(I am sure msdn has articles with demo using vbscript, for executing sp or external file containing the query template or directly construct the template query from string construction within the script itself. You just have to do a little search. I do not have them handy for the moment.)
 
Thanks...That link got me out of the gate!
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top