-NF
string myScalarQuery= "SELECT au_lname FROM Authors WHERE au_id =
'111-11-11111'";
public void CreateMySqlCommand(string myScalarQuery, SqlConnection
myConnection)
{
SqlCommand myCommand = new SqlCommand(myScalarQuery, myConnection);
myCommand.Connection.Open();
string temp= myCommand.ExecuteScalar().ToString();
myConnection.Close();
}
Jeff
>Hi, how would i take one cell from an access table, and put it into a
variable... <
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
OleDbConnection typeConn = new
OleDbConnection(frmMain.connectionString);
typeConn.Open();
OleDbCommand typeCom = new OleDbCommand(String.Format("SELECT
TableType FROM tblBlackCoconutsZing WHERE TableName = {0}",
vocabTable.ToString()), typeConn);
string tableType = typeCom.ExecuteScalar().ToString();
typeConn.Close();
OK, i have this........ it throws an exception on the exe scalar line
"no value given for one or more required parameters"
there aren't any parameters for ExecuteScalar().... so what's going on
here? THanks again
NIA