Retreive one row from DB

Jun 3 2004 7:14 PM
If I am retrieving many rows from a database I would use this. foreach (DataRow row in ds.Tables["ErrorCodes"].Rows) { ErrorCodes.Items.Add(row["ID"].ToString()); } How would I retrieve only one row of data without putting it in a foreach loop?

Answers (1)