Updating the dataset

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.
 
B

Bernie Yaeger

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top