Friday, March 9, 2012

FOR XML in a .vbs script

Is it posible to query a database and use FOR XML in the query?
At the moment I convert all records from the ADODB.Recordset to a string
that can be handler as XML. In .ASP pages you can use the Responce
stream, but how do I handle this in a .VBS script ?
It's so much easier if the database generates XML, and not my own code.
Tnx,
Rob
You can generate XML from the database by having FOR XML in your queries. If
you are using ADO, you can use the stream object to get the result back and
then load it into a DOM document.
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Rob Moerland" <rob.moerland@.NOhetnet.SPAMnl> wrote in message
news:cdave6$ks6$1@.reader11.wxs.nl...
> Is it posible to query a database and use FOR XML in the query?
> At the moment I convert all records from the ADODB.Recordset to a string
> that can be handler as XML. In .ASP pages you can use the Responce
> stream, but how do I handle this in a .VBS script ?
> It's so much easier if the database generates XML, and not my own code.
> Tnx,
> Rob
|||Hi
Check out:
http://sqlxml.org/faqs.aspx?faq=10
John
"Rob Moerland" <rob.moerland@.NOhetnet.SPAMnl> wrote in message
news:cdave6$ks6$1@.reader11.wxs.nl...
> Is it posible to query a database and use FOR XML in the query?
> At the moment I convert all records from the ADODB.Recordset to a string
> that can be handler as XML. In .ASP pages you can use the Responce
> stream, but how do I handle this in a .VBS script ?
> It's so much easier if the database generates XML, and not my own code.
> Tnx,
> Rob

No comments:

Post a Comment