Updating 2 tables that are joined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dataset that is 2 tables connected with a SQL JOIN. VB.Net 2005
takes away all INSERT, UPDATE and DELETE functions when creating the
DataAdapter.

SQL Server 2005 has no problem updating 2 tables in a single SQL statement.
Why does ADO.Net deny me, and how can I make it do a multi-table UPDATE? I'm
working in VB.Net 2005, by the way.

Thanks
 
Simply because ADO.Net cannot do an update to a JOINed table with a data
adapter -- basically it doesn't know what to update. This is also why the
rest of your crud logic was not generated with the typed dataset. You could
however roll your own by creating an update statement with parameters and
then do a command execute nonquery, handling all the logic in a transaction
sproc.
 
Back
Top