the parameter method is used to update the ACCESS database today. No error is returned, however, the data is not updated. Later, we found that when access is parameterized, the parameter location must be in the same order as the value assignment. Otherwise, data cannot be updated but no error is reported during the update.
For example: Update tablename set [a] = @ A1, [B] = @ A2 where [ID] = @ A3
when you add a parameter, you must add @ A, @ B, and @ ID. that is to say, you must
cmd. parameters. addwithvalue ("@ A1", a);
Cmd. Parameters. addwithvalue ("@ A2", B );
Cmd. Parameters. addwithvalue ("@ A3", ID );
If the sequence is incorrect, it cannot be updated. This is different from SQL Server. In SQL Server, you do not have to worry about the order in which parameters are added.
no bug is reported when the parameters of access are misplaced during update, but the access is not updated, therefore, you must note this when writing Programs .