Subject view and generator
Author jefmony2001
I have two tables and a view based on them.
table 1
id1 integer
text1 char(30)
type integer

table 2
id2 integer
code_tbl1 integer
text2 char(10)

select text1, text2
from table1,table2
where type=1 and code_tbl1=id1

trigger before insert on table1
id1 = gen_id(gen1,1);

trigger before insert on table2
id2 = gen_id(gen2,1);

the view alow to see informations about elements of table1 wich are
of the type1 (for this type there is only 1 dependant line in the

a trigger on the view allow to insert data and put it in table 1 and

but how to recover the value of id1 after the insertion in the table1
to put it in code_tbl1 in the table2.

at this time I use a variable :TEMP=GEN_ID(GEN1,0);
after the insertion in the trigger of the view, but I'm not sure to
recover the good value if another insertion in the table1 occured at
the same time.

Thanks for youor help.