HELP! ADO.NET Query Q

  • Thread starter Thread starter Mike Tuersley
  • Start date Start date
M

Mike Tuersley

Hi All!

I've searched and searched but I'm not getting it. I have a project due,
VB.NET, where I have a dataset that was returned from a web
method/reference [I have no idea or control over it]. Now that I have
the dataset, I want to search it for all records that meet my criteria -
like "SELECT IMAGE_ID WHERE IMAGE_NUMBER = 45". This data is written to
a class for later use. Then I go for the next set of values, etc. rather
than parsing the whole dataset.

I've got a dataview, datatables and I'm data-confused --- it can't be
that difficult 'cuz everything else seems much easier in .net. Can
someone please point me in the right direction?

TIA,

Mike
 
Hi Mike,

You can either use a datatable.select or a dataview.rowfilter.

You can see below in this newsgroup a long discussing which is very actual
about those two now.
(<***VB.NET***> DataTable.Select's efficiency???)

Use the dataview =
dim dv as new dataview(mydatatable)
dv.rowfilter = "IMAGE_NUMBER = 45"

Use of the select
dim drArray() as datarow
drArray = "IMAGE_NUMBER = 45"

I hope this helps?

Cor
 
Hi Cor

Thank you very much for the fast reply. I think I can get it now although the thread you referenced has me concerned about the performance - I am a cad developer/integrator and this is my first big ADO.NET project. I am inserting *X* amount of components and for each one I have to perform my query to find the subcomponents. I'm a little bit confused on which method makes the most sense but I will keep watching that thread for insight

Best Regards

Mik
 
Back
Top