INT
PARAM_ЕКОЛОГ_FK FOREIGN KEY
(ЕКОЛОГ_CODE) REFERENCES ECOLOGY_NUMBER
(CODE) ADD CONSTRAINT
PARAM_ЗАГР_ВВ_FK FOREIGN KEY
(ЗАГР_ВВ_CODE) REFERENCES ZAGRAZN_VV
(CODE) ADD CONSTRAINT
PARAM_ФОРМА_FK FOREIGN KEY
(ФОРМА_CODE) REFERENCES FORMA_OTCHETNOSTI
(CODE) ADD CONSTRAINT
PARAM_ПЕРІОДІЧН_FK FOREIGN KEY
(ПЕРІОДІЧН_CODE) REFERENCES PERIOD
(CODE)
/
PROMPT Creating Foreign Keys on 'VALUE'
ALTER TABLE VALUE ADD CONSTRAINT
VALUE_ORG_FK FOREIGN KEY
(ORG_CODE) REFERENCES ORGANIZATION
(CODE) ADD CONSTRAINT
VALUE_ОТЧЕТНОСТЬ_FK FOREIGN KEY
(ОТЧЕТНОСТЬ_CODE) REFERENCES OTCHETNOST
(CODE)
/
Додаток 3. Приклад тексту програми.
// --------------------------------------------- ------------------------------
# include
# pragma hdrstop
# include "main.h"
# include "basic.h"
# include "unislct.h"
# include "filter.h"
# include "fieldsN.h"
# include "fieldText.h"
# include "fieldList.h"
# include "fieldValue.h"
// --------------------------------------------- ------------------------------
# pragma package (smart_init)
# pragma link "tbltmpl"
# pragma resource "*. dfm"
void __ fastcall UploadMetaInfo (TformDescription * t_desc, AnsiString formname)
{
TADOQuery * mrT = new TADOQuery (NULL);
try
{
mrT-> Connection = frmMain-> cnncMetaInfo;
t_desc-> formname = formname;
if (SELECT (mrT, "select * from forms where name = '"+ T_desc-> formname +"' "))
{
t_desc-> title = mrT-> FieldByName ("title") -> AsString;
t_desc-> edittitle = mrT-> FieldByName ("edittitle") -> AsString;
t_desc-> accepttitle = mrT-> FieldByName ("accepttitle") -> AsString;
t_desc-> table = mrT-> FieldByName ("table") -> AsString;
t_desc-> keyfield = mrT-> FieldByName ("keyfield") -> AsString;
t_desc-> namefield = mrT-> FieldByName ("namefield") -> AsString;
t_desc-> listfield = mrT-> FieldByName ("listfield") -> AsString;
t_desc-> shortnamefield = mrT-> FieldByName ("shortnamefield") -> AsString;
t_desc-> sortfield = mrT-> FieldByName ("sortfield") -> AsString;
t_desc-> sequencename = mrT-> FieldByName ("sequencename") -> AsString;
t_desc-> readonly = mrT-> FieldByName ("readonly") -> AsBoolean;
t_desc-> takefieldsfrom = mrT-> FieldByName ("takefieldsfrom") -> AsString;
t_desc-> type = mrT-> FieldByName ("type") -> AsString;
t_desc-> hideonaccept = mrT-> FieldByName ("hideonaccept") -> AsBoolean;
t_desc-> parentfield = mrT-> FieldByName ("parentfield") -> AsString;
} else