Subject Re: [IBO] Re: .RecordCount doesn't have the same functionality as with BDE
Author Helen Borrie
At 07:46 PM 28-11-00 +0000, you wrote:
>Hi Dennis !
>
>
> > mostly i just run through a table with first and next, testing for
> >eot. I don't think i use recordcount for anything but display
> >purposes. But i'll check the program one of these days just to be
> >sure...
>I'll do the same... But it would have been nice if the .RecordCount
>have been accurate, but as long as there is a solution then...


Why do you need RecordCount? It is unreliable in a multi-user environment,
even if were efficient, which it is not, because it requires a full-table
scan each time it is run. It can only be considered "accurate" if run over
a table which is accessed by a single user and which is not subject to
transaction control, i.e. a fileserver database like Paradox with only one
user capable of updating a table.

Can you explain what you are using RecordCount for, then perhaps one of us
can provide you with an effective and accurate way to achieve that purpose,
e.g. in client/server, you never use RecordCount to determine whether any
records are present in a table or dataset; and, if your application wants
to know counts of objects, you store and maintain the counts specifically
with triggers on inserts and deletes.

Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________