im working on updating information in mic access 2010 using this code, but its keep telling me the syntax error in update statement. ihd already search through the previous answers but non of them work. here is my snipped code. tell me if you guys need more information.
try
{
OleDbCommand renew = test.CreateCommand();
renew.CommandType = CommandType.Text;
renew.CommandText ="UPDATE Energy_Audit SET Appliances = @app, Usage Per Day = @usg, Power (Watt) = @pow, Number of Item = @num Where ID = @id )";
renew.Parameters.AddWithValue("@app", txtApp.Text);
renew.Parameters.AddWithValue("@usg", txtUsg.Text);
renew.Parameters.AddWithValue("@pow", txtPwr.Text);
renew.Parameters.AddWithValue("@num", txtNum.Text);
renew.Parameters.AddWithValue("@id", txtID.Text);
renew.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
[Usage Per Day]
– V4Vendetta 6 hours ago