c# oledb update
<p>I am trying to update a single value into my access .accdb database via a c# winform interface. my SQL statement is:</p>

<pre><code>    updateString("UPDATE Password_Table SET Password = '" + confirmnewpasswordTextBox.Text + "' WHERE Password_ID = 'user'");
</code></pre>

<p>field-wise it should be correct but whenever i execute the updateString function it only returns zero. may I know what I am doing wrongly in the following example?</p>

<pre><code>    public static bool updateString(string SQL)
    {
        using (var connection = new OleDbConnection(connectionString))
        using (var command = connection.CreateCommand())
        {
            connection.Open();

            command.CommandText = SQL;
            command.CommandType = CommandType.Text;

            try
            {
                return command.ExecuteNonQuery();
            }
            catch
            {
                return -1;//for error
            }
        }
    }
</code></pre>

<p>Thank you!!</p>

<p>update:</p>

<pre><code>    System.Data.OleDb.OleDbException: Syntax error in UPDATE statement.
</code></pre>

<p>hmmm, i still cant figure out what is wrong, my table is Password_Table, and I am trying to update a column called Password where the Password_ID is "user".</p>

<p>update: found the error! turns out that Password is like a restricted keyword and i had to cover it in [   ] before it could work..</p>
