Advertisement
Gov_777

Варианты поиска по БД

Aug 20th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.67 KB | None | 0 0
  1.      for I:=0 to list.Count-1 do begin
  2.      str:=Trim(list[i]);
  3.      //вариант1
  4.      //DM.ADOQuery1.SQL.Clear;
  5.      //DM.ADOQuery1.SQL.Add('SELECT * FROM brut WHERE login = '+QuotedStr(str));
  6.      //DM.ADOQuery1.Active:=True;
  7.      //вариант2
  8.      DM.ADOQuery1.Sql.Clear;
  9.      DM.ADOQuery1.Sql.Add('SELECT * FROM Brut WHERE login = :FindValue');
  10.      DM.ADOQuery1.Parameters.ParamByName('FindValue').Value:=str;
  11.      DM.ADOQuery1.Open;
  12.      Application.ProcessMessages;
  13.      if string.IsNullOrEmpty(DM.ADOQuery1.FieldByName('login').AsString) then listTMP.Add(str);
  14.      Log.Caption:='Осталось проверить: '+IntToStr(list.Count - i);
  15.      end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement