How to tell if an RS is locked

Results 1 to 2 of 2

Thread: How to tell if an RS is locked

  1. #1
    Andrew Sinning Guest

    Default How to tell if an RS is locked

    OR: How to respond to an error....<BR><BR>In stress testing my application, which uses Access, by simulating multiple users posting to the database at the same time, I&#039;ve encountered an error when trying to update a record set ("Could not update; currently locked by user &#039;admin&#039; on machine...."). I&#039;d like to develop a way to either (1) check to see if the RS is locked before updating or (2) respond to the error with an action rather than terminating the script. What I would do is iteratively try to update (or wait to update) until the test stops failing.<BR><BR>Has anyone done this? I know that its possible to edit the error scripts, but doesn&#039;t this have to be done at a the global-server level? I need to be able to install my application on other people&#039;s servers without their having to modify an global settings which would effect other ASP applications.<BR><BR>What I would really like is a way to check to see if the RS can be updated before doing the update. I tried "objRS.supports(adUpdate)", but this seems to always be true.<BR><BR>Thanks. Any help with either option or any other suggestions will be very much appreciated.

  2. #2
    Andrew Sinning Guest

    Default RE: How to tell if an RS is locked

    I searched the archives a bit further and have determined that the best method will be to simply lock the application before the procedure. So, I use:<BR><BR>application.lock<BR>...<BR>application .unlock<BR><BR>I also added:<BR><BR>sub Application_OnEnd()<BR> application.unlock<BR>end sub<BR><BR>just to make sure I don&#039;t ever leave the application locked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts