I want to update some record in access data base, but the update command is
not updating the table...
Insertiion is working fine.. the code is:

com = new OleDbCommand("UPDATE ServerAuthorisation SET Permissions=@permission WHERE UserName=@user_name", conn);
conn.Open();
if (conn.State == ConnectionState.Open)
  {
      com.Parameters.Add("@user_name", OleDbType.Char, 100);
      com.Parameters.Add("@permission", OleDbType.Char, 100);

       com.Parameters["@user_name"].Value = user_name;
    com.Parameters["@permission"].Value = permission;
   }
     try
     {
      com.ExecuteNonQuery();
      conn.Close();
     }
      catch (OleDbException exe)
      {
       Console.WriteLine(exe.Message);
         Console.ReadLine();

      }

No exception is raised but the data base is not being updated... plz help...

Edited 3 Years Ago by Dani: Formatting fixed

The OLE DB.NET Framework Data Provider uses positional parameters that are marked with a question mark (?) instead of named parameters. So you'll have to replace your @... with just ? and add the parameters in the order that they should appear. Look at the Remarks on MSDN

This question has already been answered. Start a new discussion instead.