Re: Ado.net DataSet Refresh

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dear Manjree,

According to your description, you meet an issue that the inserted data
rows are not retrieved by dataadapter. However, if you close the
application and open it again, all new records are listed via DataSet. If I
misunderstand anything, please correct me thanks.

For such issue, please check the following two sections.
1) Please make sure new records have been inserted into underlying database.
You may open the underlying database and check each table and rows.

2) Please change the code snippet you pasted in the initial post.
What if you clear the dataset and fill it again? Will all rows be
retrieved by DataAdatper?

int r = adapter->InsertCommand->ExecuteNonQuery();
dataset->Clear();
adapter->Fill(dataset);

If this is the case, the issue may relate to adapter or dataset.

Please kindly test the above method and let me know the result. We are glad
to assist you.
Have a great day,
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.