-------- Original Message --------
I have a TIBOQuery object in a Delphi program whose SQL is a fairly
complex three-way union, using the "union all" option to capture all
records. By default, TIBOQuery objects appear with their
RecordCountAccurate property set to true. When I test this query in
Database Workbench, it opens and returns the records it shouldl; when I
put it into the TIBOQuery and Activate it in the Delphi IDE, no problem.
At run time (based on watching it in Debug) the query opens and gets
results just fine -- but calling RecordCount on it throws an "unexpected
end of command" ISC Error. If I set RecordCountAccurate to False, no
problem. (The RecordCount test was for RecordCount= 0, which still works
as expected when there's an empty resultset.)
So -- is this a bug, or a feature? Is there some incompatibility between
RecordCountAccurate, the RecordCount method, and complex union SQLs?
Just seeking understanding ...
Thanks,
Lane Campbell
NW Software