Inactive user ODBC timeout

Pauldohert

Something in here
Local time
Yesterday, 21:53
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
 
I've bumped this - because I reckon someone must have a fairly simple solution.

Paul
 
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.
 
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
 
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
 
Thanks namliam - I'll try something similar.
 

Users who are viewing this thread

Back
Top Bottom