how to get first row results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If my query results are more tha one row, how do I point to the firstrow and
the to the second row etc, to bind the data to textboxes?
 
How do you read your query results ? If you're using DataSet use:
myDataSet.Tables[0].Rows[Index]
If you're using DataReader, just use ReadNext method

Regards,
Kostadin Kostov
 
Kostadin answered your question then...

//c#
ds.Tables[0].Rows[0]["ColumnName"]

'vb.net
ds.Tables(1).Rows(0)("ColumnName")

Cheers,
Karl
 
Back
Top