Update DataSet with StoredProcedure

G

Guest

When I have a stored procedure, with multiple tables in MS Access, in a
dataset and I change it in my DataGrid, I get the next message when I want to
update my DataSet:

InvalidOperationException:
"Dynamic SQL generation is not supported against a SelectCommand that does
not return any base table information."

I tried to use an update query but when I fill my DataTable using
myDataAdapter.Fill(myDataSet, myTable)
directly after de update query the data is not yet persistent bij MS Access.
And therefore I get the old data back into my DataSet.

Is there any way to update a DataSet with multiple tables or make the data
persistent after the update query.
Just to make sure the data is corrct after I fill my DataAdapter?

Thanx.
 
W

W.G. Ryan eMVP

I'm guessing you are using a CommandBuilder? If so - you can't use Update
with a joined table.

Basically, if you have multiple tables, the most straightforward way to
handle it is query each table individually and load each table in a dataset.
Add datarelations between them. Edit away. Then call Update on each table
with a separate update command.
 

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