Inactive user ODBC timeout (1 Viewer)

Pauldohert

Something in here
Local time
Today, 00:10
Joined
Apr 6, 2004
Messages
2,101
ODBC Timeout - my ODBC is timing out when a user is inactive for a certain period.

My user then has to leave the application as if it has crashed - ie beacuse of the timeout my code recognises not much.

Is there a more elegant way to handle this - either handling the timeout better - or the reconnection.


Thank you!! Paul
 

Pauldohert

Something in here
Local time
Today, 00:10
Joined
Apr 6, 2004
Messages
2,101
I've bumped this - because I reckon someone must have a fairly simple solution.

Paul
 

FLabrecque

Registered User.
Local time
Today, 00:10
Joined
Nov 9, 2004
Messages
93
I would be really bad programming to have a timer execute a dummy query every minute or so (enough to escape the time out).

This time out period is something that can be altered. Perhaps the DBA or who ever is in charge of this DB can extend the time out period.

Otherwise, you could always check if the connexion is valid, and re-open the connexion if it is required.
 

Pauldohert

Something in here
Local time
Today, 00:10
Joined
Apr 6, 2004
Messages
2,101
I would be really bad programming to have a timer execute a dummy query every minute or so (enough to escape the time out).

eh? is that - It would be .....

Extending the timeout - I only want to extend it for idleness, not generally -can I do that? Plus that only lessens my problem it doesn't completely solve it.

My tables are linked - what would be best to maintain or re-establish the ODBC?

I'm still confused as the way to go?

Thanks - Paul
 

namliam

The Mailman - AWF VIP
Local time
Today, 09:10
Joined
Aug 11, 2003
Messages
11,695
You could trap the error and rebuild the connection, but this will then be a waiting time for the user. I have had simular problems and solved it by doing a Select sysdate from Dual (Oracle) every 5:30 minutes on a hidden form. Timeout was set to 6 minutes and this was "un-debatable".

Trapping the error on every place where it might occure is a pain, soing the select is easy.

Regards
 

Pauldohert

Something in here
Local time
Today, 00:10
Joined
Apr 6, 2004
Messages
2,101
Thanks namliam - I'll try something similar.
 

Users who are viewing this thread

Top Bottom