Updating the dataset

  • Thread starter Thread starter jy836
  • Start date Start date
J

jy836

When you change a query at design-time using the OleDbDataAdapter wizard,
you're supposed to re-generate the dataset to reflect the changes (such as
the addition of a table in your query) by right-clicking on the data adapter
and clicking Generate DataSet (correct?). But if you change a query at
run-time, does the DataSet automatically re-generate itself to reflect the
query changes after the "OleDbDataAdapter1.Fill(DataSet1)" line? Thanks.
 
Hi,

No. The oledbdataadapter1.fill(dataset1) will merely fill the dataset with
an additional table which contains to new query. The dataset now has tables
(0) and (1).

In order to get the result you seek, you would first have to remove table(0)
and call the fill method, which would then make the new query table(0).

Bernie Yaeger
 
Back
Top