When I recently used Asp.net and access for development, the SELECT statement is normal, but it is always unsuccessful during update, which triggers an oledbexception and reports "Update statement syntax error, error code:-2147217900"
When tracking, it is found that a separate SQL statement can be executed in access to find the cause and there is no result. Finally, I thought, is it because the keyword is used without being used?
Stringbuilder updatesql = "Update t_customer set name = ?, Company = ?, Address = ?, JJ = ?, Web = ?, ";
Updatesql. append ("email = ?, Join_date = ?, Zk = ?, Tel = ?, Stop_car = ?, ");
Updatesql. append ("bus_info = ?, Yysj = ?, Card = ?, Qz = ?, Area = ?, ");
Updatesql. append ("avg_lifecycle = ?, No_zk = ?, Bx_count = ?, Max_bx_person = ?, Min_bx_person = ?, ");
Updatesql. append ("max_person = ?, Flag = ?, Room_save_time = ?, Performance_save_time = ?, Tel_bak = ?, ");
Updatesql. append ("Sort = ?, Caixi_name = ?, Image = ?, Link = ?, State = ?, ");
Updatesql. append ("note =? ");
Updatesql. append ("where id =? ");
After adding "[]" to all the fields and table names above, try again. Everything is OK!