I have a Access 2000 (*.mdb) file which is edited by OleDb Queries.
At the moment I would like to
private void UpdateExistingRow()
string strProvider = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + ";"
string strSql = "UPDATE OPTIONS SET VAL='C:\\Edo\\Desktop\\Logo.png' WHERE IMP='LogoPath'";
con = new OleDbConnection(strProvider);
cmd = new OleDbCommand(strSql, con);
The answer was not as obvious as we initially thought, but I think I found it: IMP is a reserved keyword in Access SQL (or more likely: an operator). Strangely though it doesn't show up in the JET documentation.
So you need to make sure the DB Engine knows it's a column name by escaping your colum names with
UPDATE [OPTIONS] SET VAL='C:\\Edo\\Desktop\\Logo.png' WHERE [IMP] = 'LogoPath'