|
-
December 10th, 2011, 05:21 PM
#4
Re: Displaying Data from SQL Express db
It looks like I am getting the hang of something here:
dbConnection.Open();
dbDataAdapter=new SqlDataAdapter(sql,dbConnection);
dbDataSet = new DataSet();
dbDataAdapter.Fill(dbDataSet, "Clients");
DataRowCollection clientRows = dbDataSet.Tables["Clients"].Rows;
foreach(DataRow client in clientRows)
{
string cName = client["Name"].ToString();
MessageBox.Show(cName);
}
My question: Is this Entity Framework usage, or something else? If so, what?
Also, I don't like much having to refer to tables and columns by strings within quotes. Intellisense does not pick them up, and so it is more burdensome and more error prone to have to do this.
Is there a way to accomplish the same thing I did above where Intellisense will offer me my table names and columns?
Thanks.... (at least I feel I understand now about Data Adapters, Data Sets and Data Rows).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|