|
-
Jul 5th, 2004, 07:02 AM
#1
Thread Starter
Member
Search for a value in a dataset/datatable
I have Dataset DS.
I have Datatable DT.
I have column ValueA, ValueB, ValueC in the DT.
Now I want to input ValueA and ValueB and return ValueC.
Found this option:
DS.DT.Rows.Find(expression)
but it requires primary keys, don't have them yet.
Found this option:
DS.DT.Select(expression)
But when I use this code:
Dim myrow() As DataRow
myrow = DS.DT.Select("ValueA = '23' and ValueB = '26'") DataGrid2.DataSource = myrow
Then it returns the 'layout' of myrow;
RowError RowState ItemArray HasErrors Table
Any idea on how to get ValueC in a string or integer from myrow?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|