Managing database deletions?
I hope I can explain the problem clear enough. I am loading data from my database into a DataSet and then display the data in a ListView. The user can then select one or more of the records in the ListView for deletion and the click the Delete button. After the Update method of the DataAdapter was called, I would like the records that were successfully deleted, to be removed from the ListView, but the records that could not be deleted (for whatever reason: Concurrence problems, has child records, etc) to be highlighted in the ListView. The user can then click on a Report button to see what the reason was for each of the delete errors.
Is this possible? How can this be achieved? I am using Visual Studio 2003 and C#.
Thanks.
Kobus
[765 byte] By [
kobus] at [2007-11-20 1:11:02]

# 1 Re: Managing database deletions?
I dont know if datarelations exist in 2003 - do they?
In 2005 I would set up a datarelation to the child records, set it to cascade delete, then delete the parent record and AcceptChanges()
it would thus disappear, taking its children out with it
cjard at 2007-11-10 3:30:20 >
