Subject Re: [IBO] Re: Limit rows number in TIB_Query
Author Luiz
You may create an auxiliary table to save the amount of rows on main table.
This aux table could be:
aux_table: current_rows_in_table_XXX integer;

On BeforeInsert and BeforeDelete triggers, you update the amount of current
rows in the main table on the aux_table increasing or decreasing one
unit(1).
In BeforeInsert trigger, you can check current_rows_in_table_XXX in
aux_table and generate an exception if the max rows was achieved.

Luiz.

----- Original Message -----
From: "paolopf" <paolopf@...>
To: <IBObjects@yahoogroups.com>
Sent: Saturday, June 29, 2002 3:25 AM
Subject: [IBO] Re: Limit rows number in TIB_Query


> Hi Elen,
> I mean stop the total number of rows in a table.
> I thought to write a before insert trigger but was not sure this is
> the best and save way to solve the problem.
>
> Rgds
> Paolo Fenelli.
>