Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I havn't seen how to do it, but based on what I've read about datasets, it IS a replication of a database (full or partial) and this should be possible.

 

Anyone know?

Posted

You can query datatables with the select method which returns an array of datarows.

 

eg

 

'fill a dataset named ds with a column named "itemId"
dim rows() as datarow
rows = ds.tables(0).select("itemId < 5")

You can not get ye flask.
Posted

Can you use that like a full select statement?

 

"itemID<5 OR itemID>100"

 

That would cover really simple selects, but how about more complex ones, like when you want to populate another datatable with a combined relation of two tables?

 

Say I wanted to join MemberName and MemberBenefits at the MemberBenefitID column to have rows containing the member and their benefits?

 

I'm trying to cut back on querying the database for information I'm using when possible.

Posted

And having to requery your database for every single procedure to get more/different results is going to be pretty bad for your performance.

 

I think there is some relevent data that you would want to keep in your dataset if you use it enough, and at that point it would be better to have all of the data that you'll use repeditivly on hand.

 

From there you might want to filter or extract that data further without requerying the database.

Posted
The Find() functin is also helpful... I know I've done AND/OR in searching of a DataSet DataTable before I just can't remember if it was using the Find or the Select method....
  • *Experts*
Posted
Also check out the DataView class for sorting and filtering data ros.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...