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. 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.

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.


Recommended>>
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字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号