Big Problem

Results 1 to 2 of 2

Thread: Big Problem

  1. #1
    Join Date
    Dec 1969

    Default Big Problem

    I am trying to write some ASPs that allow various users to respond to posted questions. I do not want a user to be able to reply to a question while another user is replying (only one response allowed per question), so in my database of questions, I have a "locked" field. Before I allow the reply, I check to see if it&#039s locked (currently open by another user). I lock it during the reply, and unlock it afterwards.<BR><BR>Here&#039s my problem: what if the user hits the back button, closes the browser, or otherwise exits the page abnormally while replying? The database will still say the question is locked. <BR><BR><BR>I have on_sessionEnd function where I unlock the Database by delete from database. But the problem is it does not unlock right away, It waits till the session timesout. Is there a way to detect if the browser is closing,or user has moved to another <BR>domain.<BR><BR>Any help or Idea will be appreciated. Thanx in Advance

  2. #2
    subzer0 Guest

    Default I thought of a workaround...

    Instead of locking and unlocking the db why don&#039t you just let anyone post freely. Then when a question is answered just don&#039t allow any more posts.<BR>In the case where two users post almost simultaneously then just admit the first and disregard the second post. <BR>The only thing you&#039ll probably have to do from there is explain to your users how the thing works (it wouldn&#039t look too good to them if they post replies and not see them actually appear) <BR><BR>Hope this helps

Posting Permissions

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