How to read many rows in a cursor???

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Matias Vottero

How to read many rows in a cursor???

Post by Matias Vottero » Wed 14 Dec 2005 14:00

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);

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 16 Dec 2005 13:43

Try to use the following code:

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

q.Next;
end;

Post Reply