Hi,
I have the following code:
try
{
var conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Database.accdb");
var cmd = new OleDbCommand("UPDATE Resources SET Image=? WHERE ResourceName=?", conn);
cmd.Parameters.Add("Image", OleDbType.VarChar).Value = listView.SelectedItems[0].Tag;
cmd.Parameters.Add("ResourceName", OleDbType.VarChar).Value = _username;
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
I keep getting the following error message:
Syntax error in UPDATE statement.
I cant find the problem :( Anyone got any ideas?