Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve value from record in a dataset

Status
Not open for further replies.

henslecd

MIS
Apr 21, 2003
259
US
If I have a dataset that has field1 and field2, how do I retrieve just field1's value?

I have a count of the number of records in the dataset (recordcount).

I want to loop through them like this.

For i = 0 to recordcount

if string = &quot;dataset.table.field1(i)&quot; <-- this is where I am stuck

do this

else

do this

Next

Thanks for the help.
 
I figured it out.

If anyone was wondering....

to get a field value from the record in a dataset use

dataset.Tables(0).Rows(i)(&quot;FIELDNAME&quot;).ToString()

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top