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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting values from a data source?

Status
Not open for further replies.

columbo2

Technical User
Jul 14, 2006
97
GB
Hi All,

If I have a datasource and run the SELECT method of it.
i.e

datasource.select();

How do I then get at the values without using a datagrid or repeater or whatever.

i.e. I have textboxes and I want to write the results of the select statement to these text boxes (only one record will display.

ta
c
 
DataSet ds = new DataSet();

//Run your select to fill the Dataset here
...

foreach (DataRow row in ds.Tables[0].Rows)
{
Console.WriteLine(row["FirstName"].ToString());
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top