gridview运行时错误表或视图不存在 [英] gridview runtime error table or view does not exist
问题描述
在我的asp.net网页上,我有一个绑定到sqldatasource的gridview。首次在Page_Load中设置此数据源的Select命令。之后,我调用gridview的数据绑定方法来填充它。这很好用。当用户指定他想要查看的内容(列,日期从 - 到,以及其他一些选项)并单击"查看"按钮以重新填充我的网格视图时,就会出现问题。我在viewButton_Click方法中所做的就是重新创建select语句,将其分配给sqldatasource selectcommand并调用gridview的databind方法。当我执行此最后一步时,我收到错误"表或视图不存在"。怎么会发生这种情况?
提前感谢您的帮助。
On my asp.net web page I have a gridview binded to a sqldatasource. Selectcommand for this data source is set for the first time inside Page_Load. After that, I call gridview's databind method to populate it. This works fine. The problem arises when the user specifies what he wants to see (columns, date from - to, and some other choices) and clicks the 'View' button to repopulate my gridview. All I do in viewButton_Click method is to recreate select statement, assign it to sqldatasource selectcommand and call gridview's databind method. When I do this last step I get an error "table or view does not exist". How can this happen?
Thank you in advance for your help.
推荐答案
Hello,
< span style ="font-family:" Verdana","sans-serif"; color:#080808; font-size:10pt">感谢您的发帖! 我建议将你的问题发布在MS论坛之一,
这篇关于gridview运行时错误表或视图不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!