BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow query inside delphi

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Eric Stewart
Guest





PostPosted: Thu Apr 01, 2004 11:49 pm    Post subject: Slow query inside delphi Reply with 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
Kevin Frevert
Guest





PostPosted: Fri Apr 02, 2004 1:53 pm    Post subject: Re: Slow query inside delphi Reply with 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

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





PostPosted: Sat Apr 03, 2004 2:44 am    Post subject: Re: Slow query inside delphi Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.