TADOQuery vs Stored Procedure

I am using delphi 7 and MS sql server 2000.
assume I write the following code:
qy1.sql.clear; //qy1 is TADOQuery
qy1.sql.add(' select a, b);
qy1.sql.add(' c ');
qy1.sql.add(' from table1');
qy1.open;

how many network trip does this occur? 2(one to send sql statement, one to receive result from server), or 4(one sql.add = one network trip)?
I ask this question because I see some topic said using stored procedure can reduce network trip, I can't understand this statement(using stored procedure can reduce network trip), could anyone help me?

is it always better to use stored procedure? or under what circumstance to use stored procedure and what circumstance to use qy1.sql.add()?

thx!!
0
Tong
9/4/2008 9:15:10 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

11 Replies
1610 Views

Similar Articles

[PageSpeed] 19

> {quote:title=Tong Kwok Kei wrote:}{quote}
> I am using delphi 7 and MS sql server 2000.
> assume I write the following code:
> qy1.sql.clear; //qy1 is TADOQuery
> qy1.sql.add(' select a, b);
> qy1.sql.add(' c ');
> qy1.sql.add(' from table1');
> qy1.open;
> 
> how many network trip does this occur? 2(one to send sql statement, one to receive result from server), or 4(one sql.add = one network trip)?

I have no idea how many roundtrips there are to the server in your code sample but they do not happen when you call the Add function.

> I ask this question because I see some topic said using stored procedure can reduce network trip, I can't understand this statement(using stored procedure can reduce network trip), could anyone help me?
> 
> is it always better to use stored procedure? or under what circumstance to use stored procedure and what circumstance to use qy1.sql.add()?
> 
> thx!!

Here is link to another thread that also was about the use of stored procedure and dynamic sql.
https://forums.codegear.com/thread.jspa?threadID=1827&tstart=0

regards

/Micke
0
Mikael
9/4/2008 11:23:22 AM
Tong Kwok Kei wrote:

> I am using delphi 7 and MS sql server 2000.
> assume I write the following code:
> qy1.sql.clear; //qy1 is TADOQuery
> qy1.sql.add(' select a, b);
> qy1.sql.add(' c ');
> qy1.sql.add(' from table1');
> qy1.open;
> 
> how many network trip does this occur? 2(one to send sql
> statement, one to receive result from server), or 4(one

The call to the Add method does not cause any interaction
with the server. Add sets the value of a property of the
TADOQuery component and this takes place in memory on the
workstation where the program is running.

> sql.add = one network trip)?  I ask this question because
> I see some topic said using stored procedure can reduce
> network trip, I can't understand this statement(using
> stored procedure can reduce network trip), could anyone
> help me?

Not without more information. I doubt that using a stored
procedure will reduce the number of trips to the server for
a single SELECT statement. If it does, it must be do to
some quirk in the SQL Server over the wire protocol.

> 
> is it always better to use stored procedure? or under
> what circumstance to use stored procedure and what
> circumstance to use qy1.sql.add()?
> 
> thx!!

A stored procedure will reduce traffic between the
workstation and the server if all selected records can be
processed by the stored procedure without being returned to
the workstations or if the stored procedure executes
multiple SQL statements.

-- 
Bill Todd (TeamB)
0
Bill
9/4/2008 2:04:12 PM
what is the meaning of "if the stored procedure executes
multiple SQL statements."??

the same problem occur in the forum said "Stored Procedures can enhance 
performance because they can execute any
number of statements with a single call from the application. So if you have
a process that requires multiple statements, then definitely put those into
a stored procedure and call that from your application......"
what is the meaning (definition) of a statement??
if I write a select statement with many table join, it still count as one 
statement?
then under what circumstance will there be many sql statement?


"Bill Todd" <no@no.com> wrote in message news:10458@forums.codegear.com...
> Tong Kwok Kei wrote:
>
>> I am using delphi 7 and MS sql server 2000.
>> assume I write the following code:
>> qy1.sql.clear; //qy1 is TADOQuery
>> qy1.sql.add(' select a, b);
>> qy1.sql.add(' c ');
>> qy1.sql.add(' from table1');
>> qy1.open;
>>
>> how many network trip does this occur? 2(one to send sql
>> statement, one to receive result from server), or 4(one
>
> The call to the Add method does not cause any interaction
> with the server. Add sets the value of a property of the
> TADOQuery component and this takes place in memory on the
> workstation where the program is running.
>
>> sql.add = one network trip)?  I ask this question because
>> I see some topic said using stored procedure can reduce
>> network trip, I can't understand this statement(using
>> stored procedure can reduce network trip), could anyone
>> help me?
>
> Not without more information. I doubt that using a stored
> procedure will reduce the number of trips to the server for
> a single SELECT statement. If it does, it must be do to
> some quirk in the SQL Server over the wire protocol.
>
>>
>> is it always better to use stored procedure? or under
>> what circumstance to use stored procedure and what
>> circumstance to use qy1.sql.add()?
>>
>> thx!!
>
> A stored procedure will reduce traffic between the
> workstation and the server if all selected records can be
> processed by the stored procedure without being returned to
> the workstations or if the stored procedure executes
> multiple SQL statements.
>
> -- 
> Bill Todd (TeamB)
0
Tong
9/4/2008 3:51:58 PM
Tong Kwok Kei wrote:

> what is the meaning of "if the stored procedure executes
> multiple SQL statements."??

Each of the following is a statement.

SELECT * FROM ATABLE;

INSERT INTO ATABLE (F1,F2,F3)
VALUES(1,3,5);

DELETE FROM ATABLE WHERE F1 = 1;

> 
> the same problem occur in the forum said "Stored
> Procedures can enhance performance because they can
> execute any number of statements with a single call from
> the application. So if you have a process that requires
> multiple statements, then definitely put those into a
> stored procedure and call that from your
> application......" what is the meaning (definition) of a
> statement??  if I write a select statement with many
> table join, it still count as one statement?  then under

Yes. A SELECT statement with multiple joins is one
statement.


-- 
Bill Todd (TeamB)
0
Bill
9/4/2008 4:31:45 PM
but is there any example about "a process that requires multiple statements 
"?
it seems it is not common to have a process that requires multiple sql 
statements? at least I can't find a example at this moment!

"Bill Todd" <no@no.com> wrote in message news:10532@forums.codegear.com...
> Tong Kwok Kei wrote:
>
>> what is the meaning of "if the stored procedure executes
>> multiple SQL statements."??
>
> Each of the following is a statement.
>
> SELECT * FROM ATABLE;
>
> INSERT INTO ATABLE (F1,F2,F3)
> VALUES(1,3,5);
>
> DELETE FROM ATABLE WHERE F1 = 1;
>
>>
>> the same problem occur in the forum said "Stored
>> Procedures can enhance performance because they can
>> execute any number of statements with a single call from
>> the application. So if you have a process that requires
>> multiple statements, then definitely put those into a
>> stored procedure and call that from your
>> application......" what is the meaning (definition) of a
>> statement??  if I write a select statement with many
>> table join, it still count as one statement?  then under
>
> Yes. A SELECT statement with multiple joins is one
> statement.
>
>
> -- 
> Bill Todd (TeamB)
0
Tong
9/4/2008 5:06:24 PM
Tong Kwok Kei wrote:

> but is there any example about "a process that requires
> multiple statements "?  it seems it is not common to have
> a process that requires multiple sql statements? at least
> I can't find a example at this moment!

I do not recall any database application that I have
written that did not include at lease one process that
required more than one SQL statement. If you want an
example see the stored procedure following my signature. It
deletes a category in a hierarchical structure of
categories, all the child categories, all the links linking
notes to the categories being deleted and all of the notes
that are no longer linked to anything.

-- 
Bill Todd (TeamB)

CREATE OR REPLACE FUNCTION
note.delete_category_tree(top_category_id bigint)
  RETURNS void AS
$BODY$
DECLARE
  CATROW RECORD;
  NOTEROW RECORD;
BEGIN
  /* SELECT THE CATEGORY_ID FOR EACH CATEGORY NODE IN THE
TREE THAT IS TO
     BE DELETED. */

  FOR CATROW IN SELECT CATEGORY_ID FROM
NOTE.CATEGORY_SUBTREE_INCLUSIVE(TOP_CATEGORY_ID) LOOP

    /* FOR EACH CATEGORY_ID TO BE DELETED, SELECT THE
NOTE_ID OF ALL NOTES
       THAT BELONG TO THE CATEGORY_ID. */

    FOR NOTEROW IN SELECT N.NOTE_ID FROM NOTE.CATEGORY_NOTE
N
    	  WHERE N.CATEGORY_ID = CATROW.CATEGORY_ID LOOP

    	/* IF THE NOTE_ID IS NOT LINKED TO ANY CATEGORY_ID
OTHER THAN THE
         CATEGORY_ID BEING DELETED DELETE THE NOTE FROM THE
NOTE TABLE,
         DELETE RECORDS FOR THE NOTE FROM THE CATEGORY_NOTE
TABLE AND
         DELETE RECORDS FOR THE NOTE FROM THE KEYWORD_NOTE
TABLE. */

  	  IF (NOT EXISTS (SELECT CATEGORY_ID FROM
NOTE.CATEGORY_NOTE WHERE NOTE_ID =
  	              NOTEROW.NOTE_ID AND CATEGORY_ID <>
CATROW.CATEGORY_ID)) THEN

        /* DELETE THE KEYWORD_NOTE AND CATEGORY_NOTE
RECORDS FOR THIS NOTE
           THEN DELETE THE NOTE. THE KEYWORD_NOTE AND
CATEGORY_NOTE RECORDS
           MUST BE DELETED FIRST TO AVOID A FOREIGN KEY
VIOLATION. */

        DELETE FROM NOTE.CATEGORY_NOTE WHERE NOTE_ID =
NOTEROW.NOTE_ID;
  	    DELETE FROM NOTE.KEYWORD_NOTE WHERE NOTE_ID =
NOTEROW.NOTE_ID;
        DELETE FROM NOTE.NOTE WHERE NOTE_ID =
NOTEROW.NOTE_ID;
      END IF;
	  END LOOP;

	  /* DELETE ANY REMAINING CATEGORY_NOTE RECORDS FOR THIS
CATEGORY. */

    DELETE FROM NOTE.CATEGORY_NOTE WHERE CATEGORY_ID =
CATROW.CATEGORY_ID;

	  /* SET THE CATEGORY TO *ZAPPED* AND THE
PARENT_CATEGORY_ID TO NULL.
       PARENT_CATEGORY_ID MUST BE SET TO NULL BEFORE
DELETING THE CATEGORY
       RECORDS TO AVOID A FOREIGN KEY VIOLATION */

    UPDATE NOTE.CATEGORY
      SET CATEGORY = '*ZAPPED*',
          PARENT_CATEGORY_ID = NULL
    WHERE CATEGORY_ID = CATROW.CATEGORY_ID;
  END LOOP;

  /* DELETE THE CATEGORY RECORDS THAT HAVE BEEN TAGGED FOR
DELETION. */

  DELETE FROM NOTE.CATEGORY WHERE CATEGORY = '*ZAPPED*';
END ;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE
0
Bill
9/4/2008 5:22:38 PM
"Tong Kwok Kei" <peter@netvigator.com> wrote in message 
news:10551@forums.codegear.com...
> but is there any example about "a process that requires multiple 
> statements "?
> it seems it is not common to have a process that requires multiple sql 
> statements? at least I can't find a example at this moment!


A process almost always requires more than a single statement.

Let's say you have a process to fill a customer order. For every item on the 
order, you need to check inventory. If there is enough there, then subtract 
the ordered amount from it, and in the order item add the quantity filled. 
So you would need the following (in pseudocode):

  if inventory.quantity >= orderitem.orderqty then
  begin
    inventory.quantity = inventory.quantity - orderitem.orderqty;
    orderitem.fillqty = orderitem.orderqty;
  end;

That takes 3 SQL statements:
  You need to get the current inventory amount to see if it can be filled:
      select quantity from inventory where productid = xxx;
  You need to update inventory
      update inventory set quantity = xxx where productid = xxx;
  You need to update the order item
      update orderitem set fillqty = xxx where orderitemid = xxx;

You can execute each of these statements separately from your application, 
or you can create a stored procedure, perhaps called FillOrderItem, to which 
you can pass the orderitem id, and it does all 3 statements for you. Your 
application now only needs to make one call to the server instead of 3.

-- 
Wayne Niddery - TeamB (www.teamb.com)
Tips to Get Published: http://dn.codegear.com/article/38467
Winwright, Inc. (www.winwright.ca)
0
Wayne
9/4/2008 5:34:26 PM
Oh, thanks, it is very clear, and now I know my database programming is very 
poor!! I haven't written any stored procedure before, all the logic (like 
your ordering process) is written in delphi code.

thanks very much to all!!


"Wayne Niddery" <wniddery@chaffaci.on.ca> wrote in message 
news:10571@forums.codegear.com...
> "Tong Kwok Kei" <peter@netvigator.com> wrote in message
> news:10551@forums.codegear.com...
>> but is there any example about "a process that requires multiple
>> statements "?
>> it seems it is not common to have a process that requires multiple sql
>> statements? at least I can't find a example at this moment!
>
>
> A process almost always requires more than a single statement.
>
> Let's say you have a process to fill a customer order. For every item on 
> the
> order, you need to check inventory. If there is enough there, then 
> subtract
> the ordered amount from it, and in the order item add the quantity filled.
> So you would need the following (in pseudocode):
>
>  if inventory.quantity >= orderitem.orderqty then
>  begin
>    inventory.quantity = inventory.quantity - orderitem.orderqty;
>    orderitem.fillqty = orderitem.orderqty;
>  end;
>
> That takes 3 SQL statements:
>  You need to get the current inventory amount to see if it can be filled:
>      select quantity from inventory where productid = xxx;
>  You need to update inventory
>      update inventory set quantity = xxx where productid = xxx;
>  You need to update the order item
>      update orderitem set fillqty = xxx where orderitemid = xxx;
>
> You can execute each of these statements separately from your application,
> or you can create a stored procedure, perhaps called FillOrderItem, to 
> which
> you can pass the orderitem id, and it does all 3 statements for you. Your
> application now only needs to make one call to the server instead of 3.
>
> -- 
> Wayne Niddery - TeamB (www.teamb.com)
> Tips to Get Published: http://dn.codegear.com/article/38467
> Winwright, Inc. (www.winwright.ca)
0
Tong
9/5/2008 1:56:08 AM
> all the logic (like your ordering process) is written in delphi code.

We do it like that to keep all the logic in one textual place: the Delphi program. In
our experience, putting (random) bits of logic in the stored procedures just hides
that logic from others reading your program. At some time, that will come back to
bight you.

Oh, and just to forestall those who say that "business logic" or "rules" should be
in the database, that is not our case, as we are not writing programs that are
part of an enterprise data processing system of systems, but rather stand-alone
real-time systems that are "loosely" coupled to other enterprise systems.
0
Jim
9/5/2008 8:03:48 AM
> {quote:title=Jim Fleming wrote:}{quote}
> > all the logic (like your ordering process) is written in delphi code.
> 
> We do it like that to keep all the logic in one textual place: the Delphi program. In
> our experience, putting (random) bits of logic in the stored procedures just hides
> that logic from others reading your program. At some time, that will come back to
> bight you.
>

I can't fully subscribe to that, there are like always pros and cons.
It is true that if in the delphi code there is no comments or other source of information what a more complicated stored proc does, it's a mess. So the logic has to be documented on both sides, also in the stored procs, because you have the same problems looking at the proc code when the logic of the delphi program is unclear and changes to either side are to be done with great care.

> Oh, and just to forestall those who say that "business logic" or "rules" should be
> in the database, that is not our case, as we are not writing programs that are
> part of an enterprise data processing system of systems, but rather stand-alone
> real-time systems that are "loosely" coupled to other enterprise systems.

Even in writing it all in delphi code, you sometimes arrive to a point where the logic is splitted into several applications that interact on the data. You will have the same problems understanding the code of A when you don't know what B does - I hope you get the idea.
0
Michael
9/5/2008 10:55:53 AM
"Jim Fleming" <james.fleming@ingeteam.com> wrote in message 
news:10951@forums.codegear.com...
>
> We do it like that to keep all the logic in one textual place: the Delphi 
> program. In
> our experience, putting (random) bits of logic in the stored procedures 
> just hides
> that logic from others reading your program. At some time, that will come 
> back to
> bight you.
>
> Oh, and just to forestall those who say that "business logic" or "rules" 
> should be
> in the database, that is not our case, as we are not writing programs that 
> are
> part of an enterprise data processing system of systems, but rather 
> stand-alone
> real-time systems that are "loosely" coupled to other enterprise systems.

There's pros and cons to both sides here. There is definitely much to be 
said for keeping all related logic in one place as much as possible, and if 
you need to support multiple databases, avoiding stored procedures can help 
make your code more portable.

On the other hand, for processes involving several or many statements, 
especially where information needs to be retrieved at different points in 
order to determine or format following statements, using stored procedures 
can yield very significant performance improvements - and of course in the 
case where multiple applications need access to the same process, this is an 
excellent way to accomplish that (though that can also be done via a shared 
Delphi class).

The main thing is to document the code, whether in source code or stored 
procs. And in this case, documenting why it was decided to use a stored proc 
can also be a good thing so the next programmer that doesn't like stored 
procs doesn't arbitrarily rip them out, or conversely one doesn't start 
putting every little thing into a stored proc without specific reasons.

-- 
Wayne Niddery - TeamB (www.teamb.com)
Tips to Get Published: http://dn.codegear.com/article/38467
Winwright, Inc. (www.winwright.ca)
0
Wayne
9/5/2008 12:20:38 PM
Reply:

Similar Artilces:

PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES
PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES - ADO.NET TO ORACLE FUNCTION   I have a very simple oracle function I'm trying to call from ado.net. The code works fine for a stored procedure but I get the error  PLS-00221: is not a procedure or is undefined  when I try to call the function. here's my code:  I've manually tested both the function and stored procedure and they are both working as expected.  here's my  vb.net code Protected Overrides Sub OnLoad(ByVal e As EventArgs) Dim cnn As OracleConnection Dim sConnSt...

ASA7, ADO, Delphi and Stores Procedures
Hello! I'm developing with Delphi 5 and access ASA7 with the ADO express components. So far, so good. Now I've got a weird problem calling stored procedures: As long as I call stored procedures that only have integer parameters everything is ok. But calling a stored procedure that has a string parameter leads me to a exception "unknown error". Here's how I call my stored procedure: with ADOCommand do begin Parameters[0].Value := iIntegerValue; Parameters[1].Value := sStringValue Execute; Result := Parameters[4].Value; end; If I use ODB...

"Action Stored Procedure" vs "Stored Procedure"
How would you explain an "Action Stored Procedure" as opposed to just "Stored Procedure"RegardsAndre Colbiornsen ---------------------------------Seventh DayRåbygatan 1A,SE-223 61 LundSwedenMob.: +46-(0)708-97 78 79Mail: info@seventhday.se-------------------------------- I would say that an "action stored procedure" is one which returns data records back to the calling program. A regular "stored procedure" is one which only returns OUTPUT parameters or a RETURN value to the calling program. I personally do not distinguish between the two and call...

Using ADO.NET Execute Second Stored Procedure Depending of Output of First Stored Procedure
When a user logs onto the app, I capture their UserId, today's date and thier WINNT using ADO.NET calling a stored procedue-no problem. Now, once the above mention fields have been populated, when the same user logs on again and this time click their daily attendance time, I need to execute and update stored procedure-no problem. Each time the user logs onto the attendance page, they need to be able to view the previuos time stamps, on page load.- no problem The problem is that I cannot get all three to work in concert, although they will work independently, somewhat. Sotred proc...

View VS Store Procedure in ADO 2.5
Hi, I have to convert an DAO 3.5 access vb program to a ADO 2.5 SQL Server 2000 program. I have grids that displays 2000 records... What is the fastest SQL Server access method in ADO to return rows is it Store Proc Or Views ??? (My Data doesn't need to be change only viewed) How do we call a view in ADO? Also is my connection string good or is there a faster connection that exist I know that ODBC Is slow because of multiple layers so I use that one. (BTW I have a lot of vb experience but no experience in SQL server) Is it a good thing to open a connection only whe...

executing Proc's PB6.5 -Stored Procedures 11.02 vs Stored Procedures 11.9.2
Hi all, I had Migrated the database from 11.0.2 to 11.9.2. Powerbuilder is not executing certain procedures called from event. But when a code of Sqlca.Autocommit = True is added before calling the Procedure it works.Anybody has any idea thanx to all ram Could it be that the 2 databases are configured differently with respect to chained mode, for example? Do your sp's attempt to create temp tables or perform any other DDL? steve [TeamSybase] ram wrote: > > Hi all, > I had Migrated the database from 11.0.2 to 11.9.2. Powerbuilder is > not execut...

Calling a stored procedure inside another stored procedure (or "nested stored procedures")
Hi all - I'm trying to optimized my stored procedures to be a bit easier to maintain, and am sure this is possible, not am very unclear on the syntax to doing this correctly.  For example, I have a simple stored procedure that takes a string as a parameter, and returns its resolved index that corresponds to a record in my database. ie exec dbo.DeriveStatusID 'Created' returns an int value as 1 (performed by "SELECT statusID FROM statusList WHERE statusName= 'Created')  but I also have a second stored procedure that needs to make reference to&n...

Calling a Stored Procedure from a Stored Procedure
Can you do this? I have a sp that returns a list of eligible accounts and then I use that list in other sp but I don't want to keep copying the code, I would like to be able to use it as a sub query in other sp but I don't know if this is possible or what the syntax would be. Thanks, Aaron You cannot do that directly. You can: 1. Use User defined functions which can return a resultset 2. Use a local #temp table which can hold the resultset of the called stored procedure and use this #temp table in your subsequent processing INSERT #tempTable EXEC s...

Execute stored procedure from stored procedure
Hello,i need to execute a stored procedure from another stored procedure. For example:StoredProcedure1: Returns a table with columns "year" and "value".StoredProcedure2: Also returns a table with columns "year" and "value".In Stored Procedure3: I would like to use the results from StoredProcedure1 and StoredProcedure2 and join them. Can somebody give me an example how to execute a stored procedure from another one and use the result table for a new command?Kind regards and thanks,carsaw hi,first off all let me clarify here - you cannot return ta...

calling a stored procedure from a stored procedure
Hi Group! I'm on ASA 8.02 Build 4411 writing sprocs in WATCOM SQL. I have a sproc which breaks a given string-parameter into pieces. It's result set contains the pieces, e.g. last line of sproc: "select item from mytable;". This sproc works fine. Now I need to call this procedure from another procedure which has a variable result set. I tried the following: <snip... set ll_retval = 0; call sp_breakstring(as_bzp,','); BreakLoop: while ll_retval <> 100 and not ll_retval < 0 loop set li_zaehler = li_zaehler + 1; fetch next sp_breakstrin...

ADO.net dataset with 2 datatable store it into 1 stored procedure
Hi, i have 1 dataset which have 2 dataTable contain; dataTable 1: FieldName : firstname lastname jobtitle company mobiletelephone contact_Id Value: Barns Happy Executive Unigi 32123 0 dataTable2: Fieldname :address street city zipcode country telephone fax contact_Id 44Dover Dover Sg 12345 Singapore 2331 12313 0 I m trying to put the whole dataset into 1 stored procedure here's my code Public Function update(ByVal ds As DataSet) As B...

Call as stored procedure from another stored procedure
I am using a stored procedure (SP_A) to insert rows to a table. This is done by the cursor within the procedure. Value for one of the column is provided by SP_B. My problem is that when i call SP_B in SP_A it does not return any value (rather i do not know how to capture it from SP_A). If executed individually it returns a value. Please help with example if something specific needs to be taken care. Suresh wrote: > > Please help with example if something specific needs to be > taken care. Please always post the version and build number of ASA that you are using (e....

Stored procedure and Delphi
Hello! I use SQL Anywhere 5.5 as a SQL server and Delphi 5 as client applications development tool. I confront with a problem. I have some stored procedure. It takes no parameters, and I want to execute it from my client application. All actions are standard for it. I put a component TStoredProc on a form, make all actions to connect it to a database and SP. It is a procedure that executes selection. When I make StoredProc1.ExecProc I get a message about error "Wrong number of parameters". When I add some dummy IN parameter into SP that takes no part in SP work al...

Running a stored procedure within a stored procedure
I have a stored procedure (A), which I need to call from another stored procedure (B). The data pulled from (B) is then inserted into a temporary table. The problem I am having is the stored procedure is in a loop, and it only runs once. I need it to run each time the statement loops. For example: In the cursor I have, there are 3 rows, so the statement should return 3 rows. However, only 1 row is returned, it looks like the stored procedure is only one once. What do I have to do to get it to loop?? DECLARE dCURSOR CURSOR FOR select ID, value1, value2 from table; OPEN dCU...

Web resources about - TADOQuery vs Stored Procedure - embarcadero.delphi.ado

Resources last updated: 12/23/2015 10:14:26 PM