问题
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