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 wan开发者_运维技巧t 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.
Check that the warnings are turned off. Its been a while since I've done played with Access but I think the warnings can cause actions to fail sometimes without a dialog being displayed
docmd. setwarning false
do something....
docmd.setwarning true
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.
精彩评论