Re: Prepared TADOQuery Question
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Wed, 09 Aug 2006 20:00:32 -0500
I am using Delphi 7 and TADOQuery to attach to my SQL Server 2005.SQL server converts queries to stored procedures and then caches the stored
I have the prepared property set to true, but when using the MS SQL
Profiler, it shows that query gets passed as hardcoded text to a stored
procedure. The profiler results don't change when I open/close the query.
declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,N'@P1 varchar(20)',N'select id, value from table
where value >= @P1 order by value','AREA1'
select @p1
I would have expected something like this for the second call.
exec sp_execute 1, 'AREA2'
Is there any point in using parameterized prepared queries in ADO? Or am I
using the TADOQuery incorrectly?
procedure for future use. This is one way it executes more efficiently..
Using parameterized queries in Delphi should speed up the conversion but using
Prepare in Delphi doesn't help
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: Prepared TADOQuery Question
- From: Isaac Alexander
- Re: Prepared TADOQuery Question
- References:
- Prepared TADOQuery Question
- From: Isaac Alexander
- Prepared TADOQuery Question
- Prev by Date: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Next by Date: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Previous by thread: Prepared TADOQuery Question
- Next by thread: Re: Prepared TADOQuery Question
- Index(es):
Relevant Pages
|