DeleteEntityCollection action delayed

Posts   
 
    
thisbox71
User
Posts: 4
Joined: 12-Oct-2006
# Posted on: 12-Oct-2006 10:48:29   

I am using DeleteEntityCollection and it appears that the delete action is delayed. After the delete, I call a fetch and the entities are still there. If I put a 10 second timer, then the Fetch returns no records. Is there a way to force the Delete to commit. I tried putting a d.Commit() statement after the delete, but this did not solve the problem.

I am using the Adapter.


            DataAccessAdapter d = new DataAccessAdapter();

            EntityCollection<PatientRegistrationAddressEntity> pAddress = new EntityCollection<PatientRegistrationAddressEntity>(new PatientRegistrationAddressEntityFactory());

            d.FetchEntityCollection(pAddress, null);

            d.DeleteEntityCollection(pAddress);
            // at this point, the record have not been deleted.

            d.FetchEntityCollection(pAddress, null);

Thanks

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 12-Oct-2006 14:07:13   

Please use the posting guidelines at http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7725 for posting requests.

I am aware of an issue with Access with similar symptoms that is discussed at http://support.microsoft.com/kb/200300 but have not looked at the OLEDB provider for ADO.Net or LLBLGen to find out if it applies.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 13-Oct-2006 18:19:26   

This is something in your database system perhaps, as it's not something related to llblgen pro code, as that just calls ado.net code which directly saves the stuff into your db.

There's another possibility:

Did you by any chance miss a Commit statement? It can be you haven't committed a transaction somewhere and it is running along unless you commit another transaction elsewhere.

Frans Bouma | Lead developer LLBLGen Pro