During the IDC charging system today, some database table names need to be renamed due to naming rules:
Problem description (Environment: visualstudio2013; Framework :. net framework4.5; language: VB. net): Before the code is modified, the table name in the plain text of the database query statement is "t_userinfo". After the modification, modify the table name to "t_user" (of course, the table name in the database is also changed to "t_user"), and an error occurs. Use try ...... An error occurred while obtaining catch. The error message "Object Name t_userinfo" is invalid.
Debug the problem one by one. For example, although the table name in the explain text query statement has been changed to "t_user", the actual value of explain text is "select * fromT_userinfoWhere [email protected] and [email protected] "indicates that although the table name has been modified on the surface, the original t_userinfo operation is still performed during program execution.
If the problem is solved, you can't solve it yourself. You can still seek help from the Internet on the shoulders of giants.
1. Only one solution found on the Internet is to regenerate the solution (but I don't know why I didn't succeed, but people can succeed ).
2. delete the files in/bin/debug of the corresponding project and regenerate the project.
Once this problem is solved, it will be recorded first. I have not found many related introductions on the Internet, but I am not clear about the descriptions. In fact, I am not very clear about the causes, I don't know why this problem occurs. I hope to help my friends who have encountered this problem and hope that the passing gods will be able to give some advice.
The running result after code modification is the same as that before modification.