Advertisement
Gov_777

Параметрический запрос по полю счетчика из эдита

Oct 1st, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.49 KB | None | 0 0
  1. procedure TLog.Edit_CodChange(Sender: TObject);
  2. begin
  3. if String.IsNullOrEmpty(Edit_Cod.Text) then begin
  4. DM.ADOQuery1.SQL.Clear;
  5. DM.ADOQuery1.SQL.Add('SELECT * FROM brut WHERE LEN(TRIM(pass)) > 0');
  6. DM.ADOQuery1.Active:=True;
  7.                                          end else begin
  8.      DM.ADOQuery1.Sql.Clear;
  9.      DM.ADOQuery1.Sql.Add('SELECT * FROM Brut WHERE Cod = :FindValue');
  10.      DM.ADOQuery1.Parameters.ParamByName('FindValue').Value:=Edit_Cod.text;
  11.      DM.ADOQuery1.Open;
  12. end;
  13. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement