Subject newbie on SPs: How to imlement a wlhile not eof loop
Author Carol Milius
Hi!

I am reading some manual, inlcuding material on IBPhoenix but I am a 'little slow' and the code I wrote is not working.. any tips?

Tables:
Table A (ID:integer; FIELD:String)
Table B (ID:integer; FIELD:String)
Table C (ID:integer; FIELD:String)

ID's are set by Generator (Trigger onBeforeInsert).

The Goal:
I would like to call a procedure on AfterPost event.
This procedure would insert records on table B (TB)
The records to be inserted on TB are from TA and TC

Something like:

Begin
// AfterPost on TA
begin
while not TC.EOF do
begin
TB.ID := TA.ID
TB.Campo := TC.Campo
TC.next;
end;
end;
end;


Best Regards,


Carol.