SqlCommandBuilder using table name instead of view

时光总嘲笑我的痴心妄想 提交于 2019-12-11 07:47:59

问题


I am using a SqlCommandBuilder object to generate update statements from Select statements in a SqlDataAdapter.

My problem is that in my Select statement I am selecting from a view called vwUsers. the SqlCommandBuilder object I used generated an update statement for the table Users not the view vwUsers. How can I override that behavior ?

(I need it to use the view because this is where the triggers are being executed. We added triggers to the table view instead of the original table)


回答1:


I solved my problem by dropping the command builder and writing the SQL update command myself !



来源:https://stackoverflow.com/questions/312777/sqlcommandbuilder-using-table-name-instead-of-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!