We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Self reference exception thrown while updating the database from the dataset

Hi, I am developing a windows based application. We are using typed data sets to store data in memory. We have a folder structure that mimics the windows explorer folder structure. ie. a folder ''f1'' has a child folder say ''f2'' which in turn has a child folder say ''f3''. When the user right clicks on folder ''f1'' and says delete, I am first deleting f3, then f2 and then f1. However when I try and save the changes to the database by calling the update method, it throws a self reference exception. My guess it that this is happening because while updating the database the record ''f1'' is getting deleted first. How can this problem be solved? Thanks, Utsav.

Loader.
Live Chat Icon For mobile
Up arrow icon