Search code examples
.netoledb

Access Database doesn't execute Update-Statement


i only want to execute a simple Update to an Access Database.

Update table set a = @a, b = @b where id = @id

If i execute it directly in Access i get a Messagebox if i want to execute it if i click yes the table gets updated correctly.

If i run the statement via OleDB i get 0 Rows effected and the table doesn't gets updated.

Inserts and deletes are working fine.


Solution

  • Found out that i had a problem with the order of the parameters added to my sqlcommand...

    In SQL Server you can add them in any order you want... not so in access you have to add them in the order they are used in the command.