ADO XML and .NET

  • Thread starter Thread starter Mike Hanlon
  • Start date Start date
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
 
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."
 
Thank you for the reply.

To avoid re-inventing the wheel, is there an example of
such a transform readilly available?
 
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."
 
Back
Top