473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Update DataSet with StoredProcedure

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
1 1550
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Yog | last post by:
I have a datagrid binded to a dataset and once the user updates the grid my dataset is reflected. When i wanted to save the data to tables, however i needed to insert this data into another...
1
by: Pesko S | last post by:
Hi, Could anybody just point me in a direction where I can find information on how the heck I can update a database with relational data from an XML file. I use stored procedures to insert...
3
by: Justin | last post by:
I have created a dataset with two tables and an insert command, I need to be able to retreive the Key Identity after inserting into table "A" for use in table "B". Should I use ExecuteScalar()...
9
by: joun | last post by:
Hi all, i'm using this code to insert records into an Access table from asp.net, using a stored procedure, called qry_InsertData: PARAMETERS Long, Long, Text(20), Long, DateTime; INSERT...
5
by: Hennie | last post by:
When trying to update a record in an editable datagrid I ran into a few problems. My update procedure is just not working. Can someone please have a look at my code and see what am I doing wrong....
4
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this...
4
by: simon | last post by:
I have cashed dataSet ds = Cache("userDataSet") If ds Is Nothing Then Cache("userDataSet") = createDataSet() End If function CreateDataSet 'code for creating dataSet 'SELECT name,surname...
0
by: BVA3105 | last post by:
i update a database with a dataset and a SqlAdapter with success but when i clear and refill my dataset i always retreive the old values. I have to wait for 5 seconds to get the corrects values. ...
2
by: chandu | last post by:
Hi Guys, i am beginer in the worls of Asp.net and C#.net I have one problem that I have stored my changes of data into dataset using disconnected dataset and after completion of all changes i...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.