The MS Access db engine stopped ...you and another user ... again

Jawab The MS Access db engine stopped ...you and another user ... again

  • Thursday, August 16, 2012 3:11 AM
     
     

    I am using Direct DAO in Visual C++ 2010 pretty much according to the example provided by MS here -> http://msdn.microsoft.com/en-us/library/ff965871

    The main difference is that I am attempting to write as well as read.  I am accessing an Oracle DB via the Oracle ODBC driver. I am the only user on a personal PC. I am using Access 2010.

    After a while of working successfully - attempts to "Recordset->Update()" fail. I have a test program that can exercise the function.  I can update a record a number of times successfully, before it suddenly starts to fail. "The Microsoft Access database engine stopped the process because you and another user are attempting to change the same data at the same time."   The sequence of calls is:  

    Recordset->Edit();
    Field->GetItem(fldx)->Value = value;
    RecordSet->Update(DAO::dbUpdateRegular, false );

    This error never goes away even if I exit the program and run it again.  The only way I've found to clear the lock is to update a new value into the table using SQL command line directly.

    I have searched the forums and other places but none of the answers I've seen have helped.  Turning on ODBC tracing does not show any errors in this part. 

    Any ideas for further research much appreciated.  Sorry if I've posted in the wrong place.  The Data Development area did not seem to have an appropriate forum.

All Replies

  • Friday, August 17, 2012 5:57 AM
    Moderator
     
     Answered

    Hello,

    Do you have many thread to read the access data at the same time, or forget to close the last connect with access?

    If so, you should try to set Form.RecordLocks as 0
    http://msdn.microsoft.com/en-us/library/bb215995(v=office.12).aspx

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

  • Wednesday, August 22, 2012 1:54 AM
    Moderator
     
     

    Hi,

    Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, August 28, 2012 3:09 AM
    Moderator
     
     

    Hi,

    I marked my reply as answer, if your issue have not been solved please unmark it and update more information about this issue.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, April 25, 2013 9:24 PM
     
     

    Thank you for your answer and sorry I took so long to reply.  I do not have multiple threads and did not forget to close the database.

    The solution I eventually used is a workaround as follows. If the first attempt failed as described above - I would then generate and execute an SQL UPDATE statement instead. This would succeed and clear the error. Subsequent attempts using the Edit() ... Update() sequence would then work again - until it didn't again.