A
ACE FAN
I'm in a bind trying to do a simple insert:
OleDbCommand cmdInsert = new OleDbCommand("INSERT INTO
VEHICLE_TYPE(VEHICLE_TYPE_ID, NAME) "+
"VALUES(" +
Convert.ToString(VehTypeID + "," + tbName.Text + ")"));
cmdInsert.Connection =
(OleDbConnection)Session["dbConnMADS"];
cmdInsert.Connection.Open();
cmdInsert.ExecuteNonQuery();
cmdInsert.Connection.Close();
Both values have valid values (2, "Some Text") but when I go to execute
this thing on an Access database, I get an error saying that no value
was given for 1 or more required parameters. The Insert statement works
fine in Access. What am I doing wrong?
Thanks much.
Curt
OleDbCommand cmdInsert = new OleDbCommand("INSERT INTO
VEHICLE_TYPE(VEHICLE_TYPE_ID, NAME) "+
"VALUES(" +
Convert.ToString(VehTypeID + "," + tbName.Text + ")"));
cmdInsert.Connection =
(OleDbConnection)Session["dbConnMADS"];
cmdInsert.Connection.Open();
cmdInsert.ExecuteNonQuery();
cmdInsert.Connection.Close();
Both values have valid values (2, "Some Text") but when I go to execute
this thing on an Access database, I get an error saying that no value
was given for 1 or more required parameters. The Insert statement works
fine in Access. What am I doing wrong?
Thanks much.
Curt