The program that raised the edit record tonight has tried several times and the results are incorrect. Let's take a look and find that the program stops running after a certain statement. This time I have experience. I wrote a statement on error goto in the process. In the Error Processing Section, stop it and then press the following text in the prompt window to get the following results:
? Error
The key column information is insufficient or incorrect. Update affects multiple rows.
Check online and findCoolOn the 11th floor of this post, it seems quite reasonable: after the client cursor is updated, ADO is responsible for communicating with the database. However, if there is no primary key information, the database cannot know which data ADO needs to update, in this process, you first call the update of ADO and then process the data to be updated at the bottom layer of ADO. However, when you select data, there is no primary key that uniquely represents the record, although there is only one data in your imagination, this is only a special case. It is more of a record set with many records, therefore, a primary key that uniquely represents a record is required for communication between ADO and databases.
My original SQL statement is written as follows:
Select tblmeal. bytmealtype, tblmeal. lngrecipeid from tblmeal where ......
The above two fields are not the primary key, so an error occurs. Later I changed it
Select tblmeal. idmeal, tblmeal. bytmealtype, tblmeal. lngrecipeid from tblmeal where ......
It is normal.