Re: Lost connection



"Arjan de Haan (office)" <2x nospam nospam adwhaan AT hotpop.com> wrote in
message news:4683a561$1@xxxxxxxxxxxxxxxxxxxxxxxxx
"Shaolin" <milos.klvan@xxxxxxxxx> wrote in message
news:46836c49@xxxxxxxxxxxxxxxxxxxxxxxxx
If you really have 30000 query objects (TADOQuery, whatever) sprinkled
around in your code, you have a real maintainance nightmare. No matter
which way you would tackle the disconnection detection, you would have to
repeat it for all of those queries. That's a tough job....

Why not have a common Open/Exec method that has logging, retries and
exception handling? That way the only change is to call this method
whereever the other queries call their own Open or ExecSQL statements. The
retries would be triggered by an exception, which would close and reopen the
connection before trying again without the user knowing anything. Large
systems should have a common logging area. Makes debugging much easier.


.