我无法过滤所需的数据

时间:2019-05-23 15:03:47

标签: delphi

我正在将名称值输入编辑框。 不工作。 但是在我输入数字值时有效。 我在哪里犯错

 Procedure TForm1.Button2Click(Sender: TObject);
   var
   yazi : string;
  begin
  yazi:=Edit1.Text;
  dmcd.OraQuery1.Close;
  dmcd.OraQuery1.SQL.Clear;
  //dmcd.OraQuery1.SQL.Add('SELECT * FROM KIMLIK WHERE dosya_no= '+Edit1.Text 
  ) ;
      //dmcd.OraQuery1.SQL.add('SELECT * FROM KIMLIK WHERE ADI Like 
   "'+Edit1.Text+'%"');

  //dmcd.Oraquery1.SQL.Text:='SELECT * FROM KIMLIK WHERE lower(adi)='+ yazi;
  //dmcd.Oraquery1.SQL.Text:='SELECT * FROM KIMLIK WHERE dosya_no='+ yazi; 
  this is work

   dmcd.Oraquery1.SQL.Text:='select * from KIMLIK where (name)=' +yazi;//this 
   is not work
   dmcd.OraQuery1.Open;
   dmcd.OraQuery1.Active;
   end;

0 个答案:

没有答案