Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refill table in dataset

Status
Not open for further replies.

nirs

IS-IT--Management
Apr 4, 2003
37
IL
hi

i try to clear a table and re-fill it
e.g.
tempDetailesDataSet.T_ItemsList.Clear();
adpItems.Fill(tempDetailesDataSet.T_ItemsList);
it works on the first time but on the second time not
what i'm doing wrong???
 
In order to reuse the same DataTable object call Reset() after calling Clear():
Code:
DataTable dt = new DataTable();
while (..)
{
    //..
    dt.Fill();
    //..
    dt.Clear();
    dt.Reset();
}
dt.Clear();
dt.Dispose();
dt=null;
obislavu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top