By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

Update DataSet with StoredProcedure

P: n/a
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.

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Foef" <Fo**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
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.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.