Advertisement
Gov_777

Ввод в новую связанную таблицу

May 20th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.63 KB | None | 0 0
  1. SURVEY.Caption:=DM.ADOQuery1.FieldByName('FIO').AsString;//показал кого...
  2. DM.ADOQuery3.SQL.Clear;
  3. DM.ADOQuery3.SQL.Add('SELECT * FROM LCP, SURVEY  where (LCP.ID = SURVEY.LCP_ID) and nomer =  '+QuotedStr(DM.ADOQuery1.FieldByName('nomer').AsString));
  4. DM.ADOQuery3.Active:=True;
  5.  
  6. if string.IsNullOrEmpty(DM.ADOQuery3.FieldByName('LCP_ID').AsString) then begin
  7.    DM.ADOQuery3.Append;
  8.    DM.ADOQuery3.FieldByName('LCP_ID').AsInteger:=DM.ADOQuery1.FieldByName('ID').AsInteger;
  9.    //DM.ADOQuery3.FieldByName('Gestational_age_weeks').AsString:='Ввод';//по желанию
  10.    DM.ADOQuery3.Post;
  11.    end;
  12. SURVEY.ShowModal;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement