HI All,<BR><BR>While making web based application, I came to know lots of things nitty gretty things which I did&#039;t knew it all. But still I need to learn lots of things about the .asp. In this regards I was wandering how to lock the records while updating or deleting. If somebody is already modifying some records with the same time another user should not able to modify the same records even he should able to open the same record it all except view.<BR><BR>I know I can lock the record while adding by setting record set (3,3) and modifying (2,2) hope I am right. So please let me know how to do the same. Also how to move the last records and count + add 1 to assign unique ID to the record.<BR><BR>One more important things for me to do is trap user when he/she close the window without saying bye (I mean logout) or when he/she logs in so same user should not able to log into application while he/she is in? I thought about it and came to conclusion of having one extra field &#039;flag&#039; into user table and flag defualt value would be &#039;0&#039;. When users logs in &#039;flag&#039; value become &#039;1&#039; and when users logout &#039;flag&#039; value &#039;0&#039;. In this context it would work fine. But if user does not logout due to unwanted things happend like net got disconnected or user might be in hurry just closed browser etc, then &#039;flag&#039; value remain &#039;1&#039;, which is suppose to be &#039;0&#039;.<BR><BR>Your valuable seggestion would be great helpful for me.<BR><BR>Thanks and lots.<BR>Regards.<BR>Bisht