Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    10

    Unanswered: More user problem ASP

    Hi

    I have a more user problem in my internet application.
    At the moment I handle the problem by setting a value in the database when a user enters the page. When the user exits the page the value is removed again.
    Problem: If the system crashes or the user closes the page while data is being saved, the value will not be removed in the DB. Any Idears?
    How do you correctly handle the more user problem on webpages saving and getting data from DB??

    Brian

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Why do you need to know if a user is on a certain page? Statelessness is one of the biggest problems with the web. You can look into Sessions to maintains persistant information that will timeout if there is no activity (idle, browser closed, etc.).
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Jul 2004
    Posts
    10
    " Why do you need to know if a user is on a certain page? "

    I need to ensure that 2 user will not edit the same data at the same time. The second user on the page will then only get a readonly version.

  4. #4
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Quote Originally Posted by crazyreds
    I need to ensure that 2 user will not edit the same data at the same time. The second user on the page will then only get a readonly version.
    Do that through SQL locking. You don't need that at the page level. If you lock the record pesimisticly, then no one can update that record while you are...
    That which does not kill me postpones the inevitable.

  5. #5
    Join Date
    Jul 2004
    Posts
    10
    Can you please show me a bit of code solving the problem?

    Thanks

    Brian

  6. #6
    Join Date
    Jul 2004
    Posts
    10
    I need the record to be locked when the user enters the page and selecting the records.And released when the user leaves the page.
    But how

Posting Permissions

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