problem with property option.queryreccount

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

problem with property option.queryreccount

Post by arconet » Tue 28 Jun 2005 14:59

In the new version 5.55.0.19 for delphi 6, the property queryreccount don't work.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 29 Jun 2005 09:47

I couldn't reproduce your problem, please give us more detailed description.

arconet

Post by arconet » Wed 29 Jun 2005 14:40

Alex wrote:I couldn't reproduce your problem, please give us more detailed description.
in smartquery I introduce "select * from table", put the option queryreccount to true and then I open query, if I obtain the value of recordcount does not give back to me the number of record total.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 30 Jun 2005 07:28

Please do the following:
Create New VCL Project
1 - add OdacVcl to the uses clause;
2 - place TOraSession, TSmartQuery, TMemo and TButton on the form;
3 - setup OraSession1 with appropriate UserName, Password and Server;
4 - set SmartQuery1.Debug property to True;
3 - write the next code in the Button1.OnClick event handler:
SmartQuery1.SQL.Text := 'Select * from Emp';
SmartQuery1.Debug := True;
SmartQuery1.Options.QueryRecCount := True;
SmartQuery1.Open;
Memo1.Lines.Add(IntToStr(SmartQuery1.RecordCount));
4 - execute it

First you must see the following SQL in debug window : 'SELECT Count(*) FROM (Select * from Emp)' then 'Select * from Emp'. In the Memo you will get exact record count in table Emp.
If something going in other way, please notify me.

Post Reply