Page 1 of 1

How to read many rows in a cursor???

Posted: Wed 14 Dec 2005 14:00
by Matias Vottero
I need to read many rows in a cursor and in my example i only can read the first row.

How can i read many rows?


Q.Cursor:=OraStoredProc2.ParamByName('R2').AsCursor;
Q.Open;

//READING SECOND RECORDSET FIELDS
for i:=0 to (Q.Fields.Count -1)do begin
showmessage(Q.FieldDefList.FieldDefs.Name + ': '+ Q.Fields.AsString);

Posted: Fri 16 Dec 2005 13:43
by Challenger
Try to use the following code:

while not q.eof do begin
//Read query fields

q.Next;
end;