Dataset question.

J

john

I am trying to provide the capability to search an xml
document based on different options. I am reading the xml
document into a dataset and I would like to loop through
the dataset deleting records that don't meet the
criteria. Is there another way to do this? an example is
below for more clarity

I have an xml document with the following elements: Id,
Price, Description, Status

My xml document has many more elements and I would like to
allow them to search on any and/or all of the elements. I
am a bit new to data morphing in .net, so ANY help you
could give would be great. Thank you very much for your
help!
 
C

Cor Ligthert

Hi John,

First of all there is mostly nothign wrong with looping through a dataset.
Do not forget whatever routine you use under the cover it should be finded
and there would be some looping.

However there are a lot of methods, some of them
The datarowcollection find (needs a primary key)
The datatable.select
The dataview.rowfilter (the most performance without primary key)

If you have more question feel free to ask.

I hope this helps?

Cor
 
J

Jay B. Harlow [MVP - Outlook]

John,
In addition to the methods Cor identified.

David Sceppa's book "Microsoft ADO.NET - Core Reference" by MS Press is an
excellent tutorial on ADO.NET plus a good desk reference on ADO.NET once you
learn it.

It covers both the how & why of using the various methods Cor identified.

Hope this helps
Jay
 
J

John

Thanks for the tip, and for the book reference. I've been
looking for a good ado reference book.
 

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