Код: Выделить всё
hdle:=DBFOpen(export_dir+'\\'+ c_docinfo_file, stCreate);
if(hdle=0) exit;
DBFAddField(hdle,'cdoc',DbChar, 20, 0);
DBFAddField(hdle,'cLang',DbChar, 20, 0);
DBFAddField(hdle,'DocType',DbNum, 5, 0);
DBFAddField(hdle,'InfoType',DbNum, 5, 0);
DBFAddField(hdle,'Name',DbChar, 255, 0);
DBFAddField(hdle,'TextData',DbMemo, 255, 0);
_loop dogovor{
_loop docinfo{
DBFPutMemoFieldValue(hdle,'TextData',docinfo.TextData);
DBFPutFieldValue(hdle,'cdoc',docinfo.cdoc);
DBFPutFieldValue(hdle,'cLang',docinfo.cLang);
DBFPutFieldValue(hdle,'DocType',docinfo.DocType);
DBFPutFieldValue(hdle,'InfoType',docinfo.InfoType);
DBFPutFieldValue(hdle,'Name',docinfo.Name);
DBFInsertRecord(hdle);
}
}
DBFClose(hdle);
Код: Выделить всё
insert into docinfonew set
docinfonew.cdoc = dogovornew.nrec,
#SetDBFField(docinfonew,cLang),
#SetDBFField(docinfonew,DocType),
#SetDBFField(docinfonew,InfoType),
#SetDBFField(docinfonew,Name);
DBFGetMemoFieldValue(hdle,'TextData',docinfonew.TextData);