ADO XML and .NET

M

Mike Hanlon

Hello

I want to read an XML file that was created with ADO into
an ADO.NET dataset. The file was created using ...

rs.Save "titles.xml", adPersistXML

and is read into the dataset using...

ds.ReadXML("titles.xml")

My problem is that although the data is read OK, the
inline schema is ignored and all columns are infered a
DataType of String.

Can ADO.NET read the ADO schema? If so, how?

Thank you
 
K

Kevin Yu [MSFT]

Hi Mike,

Unlike ADO .net, ADO stores both the schema information and the data in the
same XML file. If you want to read in to an ADO .net dataset, you have to
use XSLT to transform it into two XML files which meet the format of the
DataSet schema and data.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
M

Mike Hanlon

Thank you for the reply.

To avoid re-inventing the wheel, is there an example of
such a transform readilly available?
 
K

Kevin Yu [MSFT]

Hi Mike,

I could not find the specific transformation example. However, I found one
which transforms from ADO.net to ADO. You can check the following link for
reference.

http://gnonug.xocomp.net/Support/FAQ/551.aspx

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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

Top