c char (30), _telefon char (15), _faks char (15), _skidki integer, _id_shop smallint
) (: fin_id_otdel <0) theninto OTDELY (OTDEL, PRODAVEC, TELEFON, FAKS, SKIDKI, ID_SHOP) (: fin_otdel,: fin_prodavec,: fin_telefon,: fin_faks,: fin_skidki,: fin_id_shop); =: fin_OTDEL, =: fin_PRODAVEC, =: fin_TELEFON, =: fin_FAKS, =: fin_SKIDKI, _SHOP =: fin_ID_SHOP_otdel =: fin_id_otdel;
end
CREATE PROCEDURE PROC_PROD (
fin_id integer, _naimenovanie char (30), _razmer char (10), _cena integer, _upakovka char (1), _dataprodaji date, _iste4eniegarantii date, _id_otdel integer ) (: fin_id <0) theninto PRODANNOE (NAIMENOVANIE, RAZMER, CENA, UPAKOVKA, DATAPRODAJI, ISTE4ENIEGARANTII, ID_OTDEL) (: fin_naimenovanie,: fin_razmer,: fin_cena,: fin_upakovka,: fin_dataprodaji ,: fin_iste4eniegarantii,: fin_id_otdel); =: fin_naimenovanie, =: fin_razmer, =: fin_cena, =: fin_upakovka, =: fin_dataprodaji, ENIEGARANTII =: fin_iste4eniegarantii, _OTDEL =: fin_id_otdel =: fin_id;
end
CREATE PROCEDURE PROC_SHOP (
fin_id_shop integer, _nazvanie char (25), _adres char (40), _director char (30), _chasy char (11), _banks4et integer, _telefon char (15), _faks char (15) < b align = "justify">) =: fin_nazvanie, =: fin_adres, =: fin_director, =: fin_chasy, _S4ET =: FIN_BANKS4ET, =: fin_telefon, =: fin_faks_shop =: fin_id_shop;
end
CREATE trigger discont_bi for discont
active before insert position 0 (new.id is null) then.id = gen_id (gen_discont_id, 1);
end
CREATE trigger dogovor_bi for dogovor
active before insert position 0 (new.id is null) then.id = gen_id (gen_DOGOVOR_id, 1);
end
CREATE trigger nali4ie_bi for nali4ie
active before insert position 0 (new.id is null) then.id = gen_id (gen_nali4ie_id, 1);
end
CREATE trigger otdely_bi for otdely
active before insert position 0 (new.id_otdel is null) then.id_otdel = gen_id (gen_otdely_id, 1);
end
CREATE trigger prodannoe_bi for prodannoe
active before insert position 0 (new.id is null) then.id = gen_id (gen_prodannoe_id, 1);
end
9. Код програми
unit Unit1;, Messages, ShellApi, SysUtils, Variants, Classes, Graphics, Controls, Forms,, StdCtrls, ExtCtrls, DBCtrls, Grids, DBGrids, DB, ADODB, ComCtrls,, IBDatabase, IBQuery, ...