Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Creating XML from ADO recordset object.

I want to know any easy and short method to generate the XML from the recordset
or vice versa.
[98 byte] By [Satish] at [2007-11-9 14:54:53]
# 1 Re: Creating XML from ADO recordset object.
Satish,

>I want to know any easy and short method to generate the XML from the recordset

..Save sFileName, adPersistXML

Ciao, Craig
Craig Clearman at 2007-11-11 23:33:52 >
# 2 Re: Creating XML from ADO recordset object.
If you are using 2.5, you can also save it to a stream in memory without writing
it to a file (if you are looking to manipulate the XML in code or are looking
to pass it to another object).

Craig Clearman <chclear@nospam.please> wrote:
>Satish,
>
>>I want to know any easy and short method to generate the XML from the recordset
>
>..Save sFileName, adPersistXML
>
>Ciao, Craig
>
Jim Anderson at 2007-11-11 23:34:52 >
# 3 Re: Creating XML from ADO recordset object.
"Jim Anderson" <anderson_jim@excite.com> wrote:
>
>If you are using 2.5, you can also save it to a stream in memory without
writing
>it to a file (if you are looking to manipulate the XML in code or are looking
>to pass it to another object).
>
I'd gratly appreciate if you give me a clue how to "save it to a stream in
memory without writing it to a file".
I'm creating XML using DHTML and I'd like to save XML as a form field and
pass it for processing.
Oleg at 2007-11-11 23:35:55 >
# 4 Re: Creating XML from ADO recordset object.
Oleg,

>I'd gratly appreciate if you give me a clue how to "save it to a stream in
>memory without writing it to a file".

The .Save method in ADO 2.5 will now take either a file name or a
stream object.

So instead of:

RecSet.Save "C:\Whatever.xml", adPersistXML

You can use

RecSet.Save objStream, adPersistXML

Now it is saved in a stream of information (essentially as string).

Ciao, Craig
Craig Clearman at 2007-11-11 23:37:00 >