Greg
Greg

Reputation: 34838

ADO.net - how do I reload database data into an existing & filled DataTable?

If I have an existing DataTable (already filled) but then I want to refresh/reload the data from the database directly (as I know there was a non-ADO.net process that changed data without going through the DataTable), however do I do this "refresh". Note the database data at that point can overwrite whatever is in the DataTable.

thanks

Upvotes: 0

Views: 1032

Answers (2)

Ashish Gupta
Ashish Gupta

Reputation: 15139

Try using DataTable.Clear().

Upvotes: 1

Edison Chuang
Edison Chuang

Reputation: 2921

How about after clear your DataTable then fill it again.

Upvotes: 1

Related Questions