cool hit counter The result of the code change is the same as the result before the change_Intefrankly

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.

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.

It's better to stand on the shoulders of giants and go online for help when you have a problem to solve and can't solve it yourself.

1, I found only one solution online, which is to regenerate the solution (but I don't know why it didn't work for me, but people can do it).

2, first delete the file in /bin/Debug under the corresponding project, then regenerate the project, perfect solution.

I encountered this problem, solved also so recorded first, the Internet did not find too much related to the introduction, I do not know if the description is clear, in fact, the reasons for which is not very clear, do not know why this situation, I hope that the friends who encountered this problem will help, I hope that the gods passing by can point out the way.

1、Data Science Online Open Learning Resources
2、Jingdong 360 reaches strategic cooperation Baidu helps build smart airports DT Count Readings
3、Microsofts novel approach to protecting the Internet of Things
4、Learning Notes Collection LNMP related installation software configuration file location
5、The leap from programmer to machine learning engineer

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送