A
Aussie Rules
Hi,
I populate a dataset and then bind a grid to the dataset. The application
allows the user
to repopulate the dataset to show different data in the application.
The problem seems to be that the dataset, keeps the old dataset, as the grid
then displayes multiple datasets, even though I am using the new keyword
Is there a way to totally destroy the contents of the dataset each time I
repopulate it?
My code is :
Dim command2 As New OleDbCommand("select * from WorkSheet_CostDetail
where sheet=" & intWorkSheet, dbConnection)
Dim ds As New DataSet
Dim da2 As New OleDbDataAdapter(command2)
da2.Fill(ds, "ProjectCosts")
FpSpread1.DataSource = ds
I populate a dataset and then bind a grid to the dataset. The application
allows the user
to repopulate the dataset to show different data in the application.
The problem seems to be that the dataset, keeps the old dataset, as the grid
then displayes multiple datasets, even though I am using the new keyword
Is there a way to totally destroy the contents of the dataset each time I
repopulate it?
My code is :
Dim command2 As New OleDbCommand("select * from WorkSheet_CostDetail
where sheet=" & intWorkSheet, dbConnection)
Dim ds As New DataSet
Dim da2 As New OleDbDataAdapter(command2)
da2.Fill(ds, "ProjectCosts")
FpSpread1.DataSource = ds