Reading DataSet

  • Thread starter Thread starter Ghost
  • Start date Start date
G

Ghost

Hello.
Sorry me if it's a basic question.
Ho do I read value of some field from DataSet?
Can you show me a several examples please?
 
Something like this.

Console.WriteLine( ds.Tables["tableName"].Rows[0]["someField"] );

foreach ( DataRow dtr in ds.Tables[0].Rows )
{
foreach (DataColumn c in ds.Tables[0].Columns)
{
Console.WriteLine(dtr[c.ColumnName]);
}
}
 
Thank you Sir.

Your name said:
Something like this.

Console.WriteLine( ds.Tables["tableName"].Rows[0]["someField"] );

foreach ( DataRow dtr in ds.Tables[0].Rows )
{
foreach (DataColumn c in ds.Tables[0].Columns)
{
Console.WriteLine(dtr[c.ColumnName]);
}
}

Hello.
Sorry me if it's a basic question.
Ho do I read value of some field from DataSet?
Can you show me a several examples please?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top