Home » Developer & Programmer » Forms » Timed Out and Connection Again
Timed Out and Connection Again [message #202188] Wed, 08 November 2006 11:44 Go to next message
faiz_hyd
Messages: 294
Registered: February 2006
Senior Member
Hi,

Form 5.0 , Oracle 9i.

End Users runt he application through running .fmx and they enter
username/password@DB and at first screen they enter
again a different user/password and the DEPT name which is validated from a table. and the status becomes LOGIN with Date and Time.

Now if the system is left idle say after 20 min it times out and
oracle session gets disconnected,

Now when the user gets connected agian by running .fmx it connect's but when again the first form comes to enter username/password and DEPT it validates and says Already Logon because the value is not updated in the table to LOGOUT since it was abruptly disconnected.

Even though the profile that DB user is set to 180 min it logs out.
The Client requirement is in this case when it disconnects abruptly the value should be updated to Logout so that the user when connects again should be validated and allowed to enter in the Application.

How can i update the value in the table since i am not connected.
thought like this, ON-Error trigger get the error number if it's timed out error for disconnected then executed on-logon trigger connect again to Oracle and issue update statement.. but seems not good and possible.

Any suggestion or idea.. how to fulfill the requirement.

Hoope i was able to clear the doubt.

thanks
Re: Timed Out and Connection Again [message #202230 is a reply to message #202188] Wed, 08 November 2006 18:16 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please confirm that you are MANUALLY maintaining a 'user logon' table.

If you only want the user to have a single session then I suggest you follow Tom Kyte's recommendation and set the 'profile' of the user to use the database facility 'sessions_per_user' equals 1.

David
Re: Timed Out and Connection Again [message #202254 is a reply to message #202230] Wed, 08 November 2006 20:46 Go to previous messageGo to next message
faiz_hyd
Messages: 294
Registered: February 2006
Senior Member
hi,

Thanks for folloe up.

Actually we are validating a user after he gets connected so as he gets only those buttons and those forms enabled, and when he enters into form after getting connected to Oracle and then enters the loginid which is stored in a table which has a column Status, if it is LOGIN it will not allowed to enter again in the forms, at a time that user will have only 1 record as Status LOGIN,
My question was how to update the value in this table to LOGOUT if the oracle is connected abruptly or gets disconnected due to time out or some other reason, basically i know we can't update a table unless we get connected to oracle, so is there any option where before getting abruptly disconnected it updates the value in this table to LOGOUT and all the problem is solved,

Hope i was able to clear.
Thanks for responding.


Re: Timed Out and Connection Again [message #202256 is a reply to message #202254] Wed, 08 November 2006 20:53 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
'Commit' is binary - it is 'Yes' or 'No'. What if the user had a failed validation on the screen? That record would not be in the database. You can't 'rollback' their work and 'commit' their changes to this one table, unless you use an asynchronous transaction to another area.

You could ask the user if this is their only session and if they say 'yes' you could kill all their other sessions. Hell, if they sign on again just kill/rollback their other sessions anyway.

David
Previous Topic: How to suppress Undefined key
Next Topic: how to create calculated item in Forms Version 4.5.8.1.2
Goto Forum:
  


Current Time: Sun Mar 09 22:06:28 CDT 2025