OleDbDataAdapter from DataSet

  • Thread starter Thread starter Graeme Richardson
  • Start date Start date
G

Graeme Richardson

Is it possible to get a handle on the OleDbDataAdapter that was used to
populate a DataSet?
Alternatively, is it possible to get the OleDbCommand and OleDbConnection
used to populate a DataSet - I can use these to create a new DataAdapter and
re-populate the DataSet.
I can a handle to the DataTable and DataSet ofa ComboBox and I would like to
refill/requery it.

Thanks, Graeme.
 
Hi Graeme,

No, sorry, the DataSet and DataTable are designed to be disconnected by
nature, and will not retain a reference to the source of their data, be it
XML or a DataAdapter.

However, your design could still work with some adjustments. Have you tried
to recreate Connection/Command/DataAdapter objects from connection
string/command text primatives? If you do this, you just need to pass the
DataSet over to the DataAdapter to get it refreshed. Just recreate the
DataAdapter as needed.

-rory 8)
 
Thanks Rory, I suspected the original objects were history.

What are "string/command text primatives"?
 
Thought that's what you meant.

Requires a bit of a rewrite to include them in the subclass I've created.
 
Back
Top