In your case Clear removes all the information from *Dataset* thus Update
won't do anything. Update does its things based on the rows in their
RowState.
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com
Blog: blog.rthand.com
"mick" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> I`ve been trying to get to know ADO.net lately and I wonder if anyone can
> explain why the following does not work -
>
> myDataSet.Clear();
> myDataSet.AcceptChanges();
> myTableAdapter.Update(myDataSet);
>
> If you clear the dataset and then do the update shouldnt the database be
> cleared as well. When I tried this the contents of the database are still
> there when I rerun my app.
>
> What I ended up doing was iterating throw the dataset and deleting row by
> row but I`m curious why the above doesnt work.
>
> TIA,
>
> mick