Open Recordsets

Results 1 to 2 of 2

Thread: Open Recordsets

  1. #1
    Join Date
    Dec 1969

    Default Open Recordsets

    Afternoon all,<BR><BR>I am looking for a little guidance on a problem I have.<BR>I have built a system where users are able to allocate slots from a finite list, i.e. there maybe 1000 slots spilt into 1 hour time slots, no problem with any of this, but I have realised that due to the finite number of slots and the large volume of users at peak time that some slots are being "stolen" from the database by other users.<BR>The user is 1st displayed a list of the slots that are available for the criteria they entered, when they select the 1 ( or more ) that they want, the system then checks to see if the slot they wanted still has any not allocated, if it does then it chooses 1 and updates the record to the users ID, therefore allocating it to them.<BR>What is happening sometimes ( very busy peak periods, is that another user can select the same time period, and because there are no more slots left they are queued behind the 1st user, and update the allocated record from user 1 to user 2.<BR><BR>i.e. user 1 books a 1 hour slot 1st, but user 2 is so close behind that the system, that it thinks that no one has allocated the slot, and updates user 1&#039;s slot to user 2.<BR><BR>Apologies if this is rambling b*lox, no sleep for a day.<BR>What i am after is can I lock the record when the user sees it is free, so that NO ONE can get it ?

  2. #2
    Join Date
    Dec 1969

    Default RE: Open Recordsets

    Your problem is common one with different solutions for different opinions. One option would be to set a temporary lock status on the row via another column. When the user first requests to see the open slots, you mark the column on the slot as being locked. When the user decides he doesn&#039;t want that slot, then you update it back to the free status.<BR><BR>Another option to look into would be row locking. Try doing a search on Google for it.

Posting Permissions

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