I found the error here when I was doing something today. I finally solved it, but I still need to record it for later query!
When Rs. Update () is used, the following error is found:
[Microsoft] [ODBC Microsoft Access driver] has an error.
1. Start to suspect the parameter problem. During data update, the parameter does not meet the database type or other requirements.
For example, the ID field is generally Int or automatically numbered, But if you input the char or string type, the update will fail.
Check the program to eliminate doubts;
2. The database is locked. Check whether other programs are using the database. Check discharge.
3. Return to the first one. It is just a suspicion of the database. There is a problem when the database is created. Through careful check, we found that there is a field in the database to create an "index: Yes (no duplicates)", and the updates need to be repeated, so they cannot be updated; after modification, the update is successful;
4. This is found online. You can also try the answer in www.baidu.com:
Change the RS opening method and try 1 or 2 at the end. If not, it may be because the field name you inserted or the data type of the field does not match, check it.
I found through my own check that my problem is the third. After I changed the database, even if I modified it according to the statement in 4, there was no error. Therefore, sometimes I can check the database, especially self-designed databases.