S
Steven Blair
Hi,
I have a problem understanding the SqlDataAdaptor and the DataSet.
I have a dll which has various methods for running stored procedures etc. It
also has a method which allows the client to return a DataSet from a table.
The client can modify this DataSet and I have wrote a function which will
take this DataSet back in and update the Database.
I assume this is what is meant with disconnected datasets?
Anyway, the method for updating the DataSet is not very good.
The problem is, a SqlDataAdaptor is required to update the Database.
When the DataSet was first returned to the user, the SqlDataAdaptor was a
local variable and is now out of scope. To update I have to do this:
1 - Create a new SqlDataAdaptor with the same SQL statement when I
originally got the DataSet
2. Use the Update method to update the DataSet
This really isnt a good way of working, sicne the original SQL statment to
get the DataSet needs to be kept.
I dont think I fully understand how this should work.
Any help on this would be appreciated.
I have a problem understanding the SqlDataAdaptor and the DataSet.
I have a dll which has various methods for running stored procedures etc. It
also has a method which allows the client to return a DataSet from a table.
The client can modify this DataSet and I have wrote a function which will
take this DataSet back in and update the Database.
I assume this is what is meant with disconnected datasets?
Anyway, the method for updating the DataSet is not very good.
The problem is, a SqlDataAdaptor is required to update the Database.
When the DataSet was first returned to the user, the SqlDataAdaptor was a
local variable and is now out of scope. To update I have to do this:
1 - Create a new SqlDataAdaptor with the same SQL statement when I
originally got the DataSet
2. Use the Update method to update the DataSet
This really isnt a good way of working, sicne the original SQL statment to
get the DataSet needs to be kept.
I dont think I fully understand how this should work.
Any help on this would be appreciated.