The result of the code change is the same as the result before the change
Copyright: This is an original post by the blogger and may not be reproduced without the blogger's permission. https://blog.csdn.net/huyuyang6688/article/details/38039377
Today, during the process of doing the server room charging system, there was some problem with the naming convention and some database table names needed to be renamed and this issue arose.
Description of the problem (Environment: VisualStudio2013 ; Framework: .Net Framework4.5 ; Language: VB.NET): Before modifying the code, the database query statement cmdText in the table name "T_UserInfo", after modifying the table name to "T_User" (of course, the database table name is also modified to "T_User"), the run error. Use Try ...... Catch Get Exception, exception "Object name T_UserInfo" is invalid.
Debugging sentence by sentence to find the problem, the following figure, although the query statement cmdText in the table name to "T_User", but check the real value of cmdText is "select * fromT_UserInfo where userID=@userID and password=@password", indicating that, although the table name has apparently been changed, the program is actually executing against the original T_UserInfo.