Hi,
Here is a short decsription of my problem.
I have written a dll for Database accessing. I have one method which can
return a Dataset and another method which takes a Dataset and upates a
Database. (Disconnected Datasets).
The problem I have is a new SqlAdapter is required before updating the
Database:
Therefore, to allow the update I have to do the following:
m_DataAdaptor = new SqlAdapter("select * from club",m_Conn);
I want a generic method for updating, but this way means I have to put a
hardcoded SQL string as the first parameter. The connection object is a
class member and the DataSet is passed in from the client.
Basically, what I want is a method that takes a Dataset as a parameter and
can update a Database.
One idea I had was to make the SqlDataAdapter a method of the DB class. This
means the SqlDataAdapter would stay in scope during the life of the object
(DB class).
Is there some other method of updating a Database using a Dataset ?
Any help / suggestions would be appreciated
Regards,
Steven
www.stevenblair.com