Jeff,
You would have to use a for each loop
for each targetRow as datarow in reportdataset.tables("table1").rows
targetRow.delete
next
Your acceptchanges is not needed, because that is a part of the dataadapter,
and read as well this page for the rollback
http://support.microsoft.com/default...b;en-us;310351.
When you clear your datatables the rows are removed and therefore not
updated with a rowstate remove.
I hope this helps?
Cor
"jeff" <(E-Mail Removed)>
>i am using ms access as my database
>
> i can successfully delete a single record from a table using :
>
> targetRow.Delete()
> Try
> reportDataAdapter.Update(reportDataSet, "table1" )
> reportDataSet.AcceptChanges()
> Catch ex As OleDbException
> reportCompanySitesDataSet.RejectChanges()
> MessageBox.Show(ex.Message)
> End Try
>
>
> however, i can't delete all records in a table at once using some simple
> and
> fast way.
>
> what i try is :
> reportTable.Rows.Clear()
>
> Try
> reportDataAdapter.Update(reportDataSet, "table1" )
> reportDataSet.AcceptChanges()
> Catch ex As OleDbException
> reportCompanySitesDataSet.RejectChanges()
> MessageBox.Show(ex.Message)
> End Try
>
> it fails (without any runtime error)
>
> if you have an example / suggestion, pls let me know.
>
> thanks.
>
>