If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > More user problem ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-04, 09:48
crazyreds crazyreds is offline
Registered User
 
Join Date: Jul 2004
Posts: 10
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
Reply With Quote
  #2 (permalink)  
Old 11-03-04, 16:29
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 11-04-04, 02:17
crazyreds crazyreds is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 11-04-04, 13:15
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #5 (permalink)  
Old 11-04-04, 17:05
crazyreds crazyreds is offline
Registered User
 
Join Date: Jul 2004
Posts: 10
Can you please show me a bit of code solving the problem?

Thanks

Brian
Reply With Quote
  #6 (permalink)  
Old 11-05-04, 03:27
crazyreds crazyreds is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On