string str = "Select table1.columnA, table1.columnB, table2.columnC from table1 left join table2 on table1.columnD = table2.columnD";
DataAdapter da = new DataAdapter(str,connection);
da.Fill(dataset, "tablename");
I want to update the changes in the dataset back to the database. I cannot use the DataAdaptor.Update method, like this:
da.Update(dataset,"tablename");
If I run the above command, I got an error like "Dynamic Sql generation is not supported against multiple base tables." How do I go about updating the changes? Note that I only need to update the changes to table1, not table2.
Jignesh TrivediPosted Jul 6, 2012, 12:03 AM
I think this is not supported by DataAdpter.Update methods but if your two table are in relation as parent child then it might work for you.
Please Refer
http://msdn.microsoft.com/en-us/library/4esb49b4%28v=vs.80%29.aspx
http://msdn.microsoft.com/en-us/library/xzb1zw3x%28v=vs.80%29.aspx
hope this will help you.