K
Keith Smith
How come this code doesn't work...?
myConn.Open();
DataSet dtSet = new DataSet();
myCmd.Fill( dtSet, "security" );
DataTable dTable = dtSet.Tables[0];
string str;
str = (string)dtSet.Tables["security"].Row[0].["name"];
MessageBox.Show(str);
I get the message "Identifier expected".
In case you are wondering, I am trying to read the first row of a table
called "security" in an MS Access database. The column name is "name".
myConn.Open();
DataSet dtSet = new DataSet();
myCmd.Fill( dtSet, "security" );
DataTable dTable = dtSet.Tables[0];
string str;
str = (string)dtSet.Tables["security"].Row[0].["name"];
MessageBox.Show(str);
I get the message "Identifier expected".
In case you are wondering, I am trying to read the first row of a table
called "security" in an MS Access database. The column name is "name".