Updating 2 tables that are joined

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
 
E

Earl

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top