We help IT Professionals succeed at work.

hi expert I can display information in the database using Oraquery. but  There are fewer records in the DElphide.  The query 'select count (*) ID' in the database is 25,587. However, only 25 data are

ali şahin
ali şahin asked
on
Medium Priority
132 Views
Last Modified: 2019-05-24
procedure TForm1.Button2Click(Sender: TObject);
var
yazi : string;
toplam:integer;
begin
yazi:=Edit1.Text;
dmcd.OraQuery1.Close;
dmcd.OraQuery1.SQL.Clear;
dmcd.OraQuery1.SQL.Text:='select * from KIMLIK'; //I get the data.
dmcd.OraQuery1.Open;
toplam:=dmcd.OraQuery1.RecordCount; //the count of the data is 25 here.
Label1.Caption:=toplam.ToString;
end;

procedure TForm1.Button3Click(Sender: TObject);
var
toplam:integer;
begin
toplam:=dmcd.OraQuery1.RecordCount;//When I put down the scroll bar of dbgirid, the number of data is 25587.
Label1.Caption:=toplam.ToString;
end;

Open in new window

Comment
Watch Question

Oracle dba
CERTIFIED EXPERT
Top Expert 2009
Commented:
this is normal if the property fetchrows is set to 25 and fetchall is false of the oraquery
those are the defaults

set the property fetchall to true

dmcd.OraQuery1.Close;
dmcd.OraQuery1.fetchall := true;
dmcd.OraQuery1.SQL.Clear;

Open in new window

Author

Commented:
Yes.thank you so much.It is work :)