Subject Re: [ib-support] Record Count
Author Nando Dessena

> Sure, here it is. As you can see, I use the IBX components but you can
> change this to use whichever query components that you use.

IBO does this automatically when a call to RecordCount is made (and it
actually works).

> ibCount.SQL.Text := 'Select Count(*) ' +
> copy(Query.SQL.Text, pos('from', lowercase(Query.SQL.Text)),
> length(Query.SQL.Text));

Just hope you don't have the word 'from' in any of the select field
names, and that your select does not use a distinct clause or
aggregates, as this approach would fail.
Years ago I hit this kind of problems and I had to rewrite my
SQL-manipulating functions to do real parsing, that's why I am warning