473,657 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unlocking db objects in Session end

Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is abandoned.
however
if the page user, closes the browser window instead of clicking hte log out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve the
same.
Thanx in advance.
regards,
--
S.Sundararajan
Nov 19 '05 #1
2 1147
Sundararajan,

It does work if you put the code in Session_End. However, if you do not
explicity set the Session.Timeout , the default is 20 minutes. So, your code
in the Session_End won't excute until there is 20 minutes of inactivity on
that session.

HTH
T

"Sundararaj an" wrote:
Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is abandoned.
however
if the page user, closes the browser window instead of clicking hte log out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve the
same.
Thanx in advance.
regards,
--
S.Sundararajan

Nov 19 '05 #2
as a follow up I would say it's a really bad idea to leave a database table
locked between requests. you have no idea what the user is going to do or
how long it will take him to respond.

obviously I can't comment on your specific application, but I would
generally try to avoid this scenario

Andy

"tperri" <tp****@discuss ions.microsoft. com> wrote in message
news:43******** *************** ***********@mic rosoft.com...
Sundararajan,

It does work if you put the code in Session_End. However, if you do not
explicity set the Session.Timeout , the default is 20 minutes. So, your
code
in the Session_End won't excute until there is 20 minutes of inactivity on
that session.

HTH
T

"Sundararaj an" wrote:
Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is
abandoned.
however
if the page user, closes the browser window instead of clicking hte log
out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve
the
same.
Thanx in advance.
regards,
--
S.Sundararajan

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3167
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example, if a user logs onto the website, a user object is created that stores their full name, email address, street address, phone, etc. This object also has methods to do 'other' things such as validations, counters,
8
1663
by: Keith-Earl | last post by:
Okay, looking for a Best Practice. We are building a classic three tier app in VB.NET. When we load up a WebForm we have access to very useful objects such as the Session object. We frequently store short lists in Session or even Application objects and retrieve them later without having to make a round trip to the db. We think the best place to do all this is in the Business tier and not to clutter up the client (WebForm). In order...
2
1993
by: Chris | last post by:
Hi, I am building a single webform/webpage asp.net application using VB.NET. I have created lots of classes for this web application. On page load I use a facade controller pattern class to perform all my initial class object instaniations using sub new() procedures I'm using this project to learn the ins and outs of OOA and OOD, so instead of doing everything in code behind pages I have lots of objects now created
47
3100
by: Max | last post by:
Due to the behaviour of a particular COM object, I need to ensure that a request for a particular ASP page is finalized before another request for the page is processed. Does IIS have a way to ensure that subsequent requests will be queued until the current request is completed? If not, can IIS be configured to use seperate processes to satisfy requests for a nominated ASP page? Thanks in advance.
2
1436
by: HankD | last post by:
Hi, I am having a problem with instantiating two custom objects so they DO NOT point to the same memory location. What is happening is that changes I am making to my object1 are changing object2. I beleive this is because I set both to be equal to the same session variable. So when I change the value in test1.name it updates test2.name as well as the session variable itself. What I want to do is keep an "ORIGINAL" copy of the data in case...
4
1274
by: mark_drewersback | last post by:
I've been developing in .net for approx 6 months now and would like an opinion on whether it is ok to use session to store objects? I normally create a property such as below in code behind on every page that will use the object. Public Property Environment() As bsEnvironment Get Return CType(Session("Environment"), bsEnvironment) End Get
3
5548
by: NaeiKinDus | last post by:
Hello, i'm trying to program a thread that would be locked (by a mutex) and that would only be unlocked once that a function (generating data) is done. The purpose is to generate data, and unlock the mutex in order to activate the thread once the data is generated. I have to do it this way, i can only call the thread if the data are generated. ******************************************************** step 1: initialize the mutex
3
1964
by: Maximiliano | last post by:
Hello, I have an asp.net project that calculates a general tax. Ok, this tax is a big object formed with another child objects (as a mather of fact 15 another child object within it), like Ship, Vehicle, Bike, etc. each one could be null and has his own attributes and properties. For example Tax { int _period;
13
2401
by: DigitalDave | last post by:
A project I did awhile back stored php5 objects in elements of the $_SESSION array between pages that were navigated on the site. There were object classes representing teachers, and object classes representing students that referenced teacher objects. Then I happened to look at the temporary files created by sessions and found much redundant data was stored in each file about the teachers since they were referenced by every student in...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.