 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eric Stewart Guest
|
Posted: Thu Apr 01, 2004 11:49 pm Post subject: Slow query inside delphi |
|
|
Any ideas?
I have a SQL Server 2000 stored procedure that takes 10 seconds to run from
Query Analyzer. In Delphi 6, using TADOQuery, times out although I have
command timeout at 4 minutes. Not sure how high would have to set the time
out for it to complete, but why such a big performance difference? Where can
I look for a possible problem/resolution?
Thanks
Eric
|
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Fri Apr 02, 2004 1:53 pm Post subject: Re: Slow query inside delphi |
|
|
Eric,
Try the TADODataSet
- Set (at design time) the CommandType to cmdStoredProc
- Configure the parameters as normal
- When you need to open the component..
qMyProc.DisableControls;
try
qMyProc.Close;
{Set the desired parameters}
qMyProc.Open;
finally
qMyProc.EnableControls
end;
http://bdn.borland.com/article/0,1410,27790,00.html
Good luck,
krf
"Eric Stewart" <stewarte (AT) repsilverstate (DOT) com> wrote
| Quote: | Any ideas?
I have a SQL Server 2000 stored procedure that takes 10 seconds to run
from
Query Analyzer. In Delphi 6, using TADOQuery, times out although I have
command timeout at 4 minutes. Not sure how high would have to set the time
out for it to complete, but why such a big performance difference? Where
can
I look for a possible problem/resolution?
Thanks
Eric
|
|
|
| Back to top |
|
 |
Eric Stewart Guest
|
Posted: Sat Apr 03, 2004 2:44 am Post subject: Re: Slow query inside delphi |
|
|
Thanks Kevin.
Will give it a try first thing Monday morning!
Eric
"Kevin Frevert" <Work (AT) drinkingcoffee (DOT) com> wrote
| Quote: | Eric,
Try the TADODataSet
- Set (at design time) the CommandType to cmdStoredProc
- Configure the parameters as normal
- When you need to open the component..
qMyProc.DisableControls;
try
qMyProc.Close;
{Set the desired parameters}
qMyProc.Open;
finally
qMyProc.EnableControls
end;
http://bdn.borland.com/article/0,1410,27790,00.html
Good luck,
krf
"Eric Stewart" <stewarte (AT) repsilverstate (DOT) com> wrote in message
news:406caa23$1 (AT) newsgroups (DOT) borland.com...
Any ideas?
I have a SQL Server 2000 stored procedure that takes 10 seconds to run
from
Query Analyzer. In Delphi 6, using TADOQuery, times out although I have
command timeout at 4 minutes. Not sure how high would have to set the
time
out for it to complete, but why such a big performance difference? Where
can
I look for a possible problem/resolution?
Thanks
Eric
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|