| View previous topic :: View next topic |
| Author |
Message |
Bill N Guest
|
Posted: Tue Aug 24, 2004 7:44 pm Post subject: How to Handle a Timeout error |
|
|
I've created an Client/Server Application using D6 SP2 and all seems to
work well except on one client who has a farm of citrix servers (6
machines) with a database server with MSDE on the machine.
The client has been experiencing timeouts. I would like to know:
=================================================================
1) How I can I determine whether it is the TADOConnection that is
timing out or a specific query?
2) If it is a specific query that is timing out, which one?
3) Other than increasing the CommandTimeout property, is there
anything that I can do to prevent timeouts?
=================================================================
Thanks,
Bill N
|
|
| Back to top |
|
 |
Bill N Guest
|
Posted: Wed Aug 25, 2004 4:59 am Post subject: Re: How to Handle a Timeout error |
|
|
| Quote: |
2) If it is a specific query that is timing out, which one?
You would have to keep track that in your code.
Something like: |
=============================
log.Write('Executing Query1');
Query1.Open;
log.Write('Query1 Executed');
=============================
Or better yet write something on the OnFetchComplete or AfterOpen event.
Is there a better way of doing this?
Thanks,
Bill N
|
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Wed Aug 25, 2004 12:48 pm Post subject: Re: How to Handle a Timeout error |
|
|
Bill,
Did you wrap your queries in a try..except block ??? in the except block you
can trap the timeout error.
|
|
| Back to top |
|
 |
Bill N Guest
|
Posted: Wed Aug 25, 2004 1:28 pm Post subject: Re: How to Handle a Timeout error |
|
|
Del Murray wrote:
| Quote: | Bill,
Did you wrap your queries in a try..except block ??? in the except
block you can trap the timeout error.
|
Hi Del
What is it though -- ETimeout and how do I get which query timed out?
Thanks,
Bill N
|
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Wed Aug 25, 2004 2:44 pm Post subject: Re: How to Handle a Timeout error |
|
|
Do you have each query.open in a try .. except or are you using a global
exception handler. I put each one in a try except, that way I know which one
is failing. I do this ...
try
qryDataSet.close;
qryDataSet.commandtext := blah blah blah // or what ever,
qryDataSet.Open
except'
on e:exception do begin
showmessage(e.message);
end;
end;
This seems crude, but if an "open" fails that means that their is something
bad wrong. the e.message will tell you what. It may be a timeout but may be
something else. What ever it is, I dont want to just handle timeouts, I want
to know why any failure took place and this gives it to me.
|
|
| Back to top |
|
 |
|