Live Chat Icon For mobile
Live Chat Icon

How to retrieve value of a field in a dataset

Platform: ASP.NET| Category: ADO.NET

VB.NET

ds.Tables('TableName').Rows(0)('ColumnName')

C#

ds.Tables['TableName'].Rows[0]['ColumnName'];

where TableName and ColumnName could be also integer (not in quotes then) to indicate you refer to the table’s or column’s index position.
Rows(0) indicates the first and only row in DataTable’s Rows collection

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.