Wrong field count in database tables view
Brought to you by:
tonim
The field count as is appears in the detailed view for the databse is
wrong if the table structure has been modified.
It *seems*
IBAccess is using something like:
select
RDB$RELATION_NAME, RDB$FIELD_ID
from
RDB$RELATIONS
where not (RDB$RELATION_NAME like
'RDB$%')
to obtain these fields, but I *think* this gives the
number for the next field in the history of the table instead of the
current field cound, and IBaccess should use something like this
to obtain the current field count:
select
RDB$RELATION_NAME,
count(RDB$FIELD_NAME)
from RDB$RELATION_FIELDS
where not
(RDB$RELATION_NAME like 'RDB$%')
group by
RDB$RELATION_NAME