Hi,
I've tried to find an answer to do this online but apparently it can't be done (I mean at the app level, not database). I have a need to clear out my dataset completely and reset the primary key at the same time. Any ideas?
Alternatively, one hack i can use is to reinitialize the dataset but that doesn't seem possible as well since the dataset is shared between different classes in the app (I'm creating the shared dataset in Program.cs).
Thanks
Farooq
Update:
ok i tried this:
MyDataSet sharedDS = new MyDataSet();
. . .
CleanDS()
{
MyDataSet referenceDS = new MyDataSet();
sharedDS.Table1.Reset();
sharedDS.Merge(referenceDS);
}
My original problem is solved but now I get an System.ArgumentException for Column1 does not belong to Table1 where I can see the columns in the DataSet Viewer as well as see the populated rows. Also note that I can manually re-create the entire DataSet and I still get the same error. Any ideas?