Hello,
I have another problem. Please take a look at these lines:
UniConnection1.GetTableNames (StringList1, false);
for i := 0 to StringList1.Count - 1 do
begin
UniTable1.TableName := StringList1.Strings ;
UniTable1.Open;
StringGrid1.Cells [1, i] := IntToStr (UniTable1.RecordCount);
UniTable1.Close;
end;
For every table with more than 24 records is UniTable1.RecordCount = 25.
I tried this with UniDAC for Delphi 7 Version 2.70.0.8 (27-May-2009) and InterBase 2007 or Oracle 8.05.
Is this a bug or is there any parameter to set?
FYI: TUnIQuery and 'select count(*) from ' works fine.
Thanks in advance,
Gerd Brinkmann
invent GmbH
TUniTable.RecordCound = 25 ???
Hallo Gerd,
in your Unidac help search for "FetchRows", "QueryRecCount" and "SpecificOptions" topics.
Example 1 (only for Oracle):
MyUniQuery.SpecificOptions.Add('Oracle.FetchAll=False');
Example 2 (for all RDBMS):
MyUniQuery.SpecificOptions.Add('FetchAll=True');
The "QueryRecCount" does have a performance impact, so it should only be used if really needed.
in your Unidac help search for "FetchRows", "QueryRecCount" and "SpecificOptions" topics.
Example 1 (only for Oracle):
MyUniQuery.SpecificOptions.Add('Oracle.FetchAll=False');
Example 2 (for all RDBMS):
MyUniQuery.SpecificOptions.Add('FetchAll=True');
The "QueryRecCount" does have a performance impact, so it should only be used if really needed.
Hello Tobias,
thank you for this information. My Problem is in the UniTable, not in UniQuery.
With your hint i learned, that there is a property 'FetchRows' in TUniTable, which is by default = 25, so every UniTable.RecordCount gives 25.
Setting the SpecificOption 'FetchAll = true' is no good idea, because it's only useful by small tables.
Okay, the problem is solved. I replaced all 'Table.RecordCount' with 'select count(*)'.
Thanks,
Gerd Brinkmann
invent GmbH
thank you for this information. My Problem is in the UniTable, not in UniQuery.
With your hint i learned, that there is a property 'FetchRows' in TUniTable, which is by default = 25, so every UniTable.RecordCount gives 25.
Setting the SpecificOption 'FetchAll = true' is no good idea, because it's only useful by small tables.
Okay, the problem is solved. I replaced all 'Table.RecordCount' with 'select count(*)'.
Thanks,
Gerd Brinkmann
invent GmbH