DataSet as Data Source?

K

Kevin Spencer

I'm working on a client-server application with which I would like to use a
DataSet as a Data Source. That is, I plan to create an XML DataSet file,
which I can then use as a relational database of sorts. I suppose what I'm
looking for is a Data Provider which can interact with an XML DataSet file,
executing queries of various sorts. Is there an existing OLE DB data
provider out there somewhere that can interact with an XML file created from
an ADO.Net DataSet, or do I have to write one for myself?

Thanks,

Kevin Spencer
..Net Developer
Microsoft MVP
http://www.takempis.com
Big things are made up
of lots of little things
 
O

Oisin Grehan

Hi Kevin,


It sounds like you want to run standard relational SQL queries against an
XML source. While you can't do this directly, you can use the
XmlDataDocument class for similar behaviour. This lets you load an XML
document and expose a DataSet interface and vice-versa. Each hierarchical
level in your XML can be exposed as a DataTable using DataRelations (with
Nested set to true) and you can then run traditional Sql against this. In
reality it can get a bit hairier than it sounds, so get familiar with these
elements, particularly DataRelations and Xml Schema before you dive in too
deep.

Hope this helps,

- Oisin
 
K

Kevin Spencer

Thanks Oisin. That is exactly what I want to do. And, although I'd love to
write an OLE DB driver to do that myself, I think your solution falls more
within the bounds of my time constraints!

--
HTH,

Kevin Spencer
..Net Developer
Microsoft MVP
http://www.takempis.com
Big things are made up
of lots of little things
 

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