XMLDOM save

D

Dikkuuhh

I must get a lot of information out of my database into a XMLDOM. The
database part is done, all the information is in SQLDataReaders, but
how can i convert all that information into a XMLDOM??

I must get it nice so i can load the information later..

Greetz Koen
 
M

Martin Honnen

Dikkuuhh said:
I must get a lot of information out of my database into a XMLDOM. The
database part is done, all the information is in SQLDataReaders, but
how can i convert all that information into a XMLDOM??

What are you using, the Microsoft .NET Framework? That has an
SqlDataReader you can create with the ExecuteReader method of an SqlCommand.
But SqlComand also has method ExecuteXmlReader so you can do e.g.
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(sqlCommandInstance.ExecuteXmlReader());
xmlDocument.Save(@"file.xml");
Check the MSDN documentation about ExecuteXmlReader, it works only with
special FOR XML SQL commands issued:
<http://msdn.microsoft.com/library/d...lientSqlCommandClassExecuteXmlReaderTopic.asp>
 
D

Dikkuuhh

I`m using ASP.NET 2.0, but i don`t understand what you are saying...

Do you have a small sample code where it happens??

Thanx

Koen
 
D

Dikkuuhh

I`m a newbie if it comes to xml so i didn`t get result in your sample
and your link.....

Can you give me a small sample working?

Many thanx,

Koen
 
M

Martin Honnen

Dikkuuhh said:
I`m a newbie if it comes to xml so i didn`t get result in your sample
and your link.....

Can you give me a small sample working?

I did post a sample, I also posted links to documentation and more
complete samples. If you can't work with them then you would at least to
explain in detail what you have tried, where it failed to get further
help. But I suggest you then take the questions to an appropriate
Microsoft group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,002
Messages
2,570,261
Members
46,859
Latest member
VallieMcKe

Latest Threads

Top