D
Doug Bell
Hi,
I thought I had this sorted this morning but it is still a problem.
My application has a DataAccess Class.
When it starts, it:
Connects to a DB (OLE DB)
If it connects it uses an OleDbCommand with an SQL String and the connection
it has a DataAdapter with the command
then it fills the DataSet's DataTable with the streamed data.
It does this for 6 DataTables,
then it closes the connection.
That all works fine including saving the DataSet to an XML file and if the
connection to the DataBase is not successful, it reloads the last know good
DataSet from the pre-Saved XML.
What I am trying to achieve is to periodically (once an hour or on demand )
update 4 of the DataTables from the DataBase.
The code for this is:
ConnectMyDB() sub to connect to the Database
If MyDBConnected Then
If Not HasDownloaded Then
'Do the first download stuff
Else
daMyTable1.Update (dsMyDataSet, "MyDataTable1")
daMyTable2.Update (dsMyDataSet, "MyDataTable2")
daMyTable3.Update (dsMyDataSet, "MyDataTable3")
daMyTable4.Update (dsMyDataSet, "MyDataTable4")
End If
This runs without error but the DataSet is not updated with any of the
changes that have occured at the DataBase.
Am I missing something?
Thanks Doug
I thought I had this sorted this morning but it is still a problem.
My application has a DataAccess Class.
When it starts, it:
Connects to a DB (OLE DB)
If it connects it uses an OleDbCommand with an SQL String and the connection
it has a DataAdapter with the command
then it fills the DataSet's DataTable with the streamed data.
It does this for 6 DataTables,
then it closes the connection.
That all works fine including saving the DataSet to an XML file and if the
connection to the DataBase is not successful, it reloads the last know good
DataSet from the pre-Saved XML.
What I am trying to achieve is to periodically (once an hour or on demand )
update 4 of the DataTables from the DataBase.
The code for this is:
ConnectMyDB() sub to connect to the Database
If MyDBConnected Then
If Not HasDownloaded Then
'Do the first download stuff
Else
daMyTable1.Update (dsMyDataSet, "MyDataTable1")
daMyTable2.Update (dsMyDataSet, "MyDataTable2")
daMyTable3.Update (dsMyDataSet, "MyDataTable3")
daMyTable4.Update (dsMyDataSet, "MyDataTable4")
End If
This runs without error but the DataSet is not updated with any of the
changes that have occured at the DataBase.
Am I missing something?
Thanks Doug