Gridview 不更新插入/更新命令
我有一个设置为 sql 数据源的 gridview,它会自动生成列。如果我将一列添加到它引用的表中,它将绘制该列并显示它,但它不会更新插入/更新命令以包含新列。有什么办法让它自动重建这些命令吗?
I have a gridview that is set to a sql datasource, it is generating the columns automatically. If I add a column to the table it is referencing, it will draw that column and display it, but it does not update the insert/update commands to include the new column. Is there any way have it rebuild those commands automatically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须更新插入/更新命令来指定参数,我认为您的 gridview 在将其添加到表后显示该列的唯一原因是因为您的 select 命令正在执行
select * from [表]
You will have to update the insert/update commands to specify the parameters, the only reason I can think that your gridview is showing the column after you have added it to the table is because your select command is doing a
select * from [table]