Form1.qry_2.Close;
Form1.qry_2.SQL.Clear;
Form1.qry_2.SQL.Add(' select * from RC1 where 领货日期 between #'+FormatDateTime('yyyy-mm-dd',edt2.date)+'# and #'+FormatDateTime('yyyy-mm-dd',edt3.date)+'# and 领货人='''+QuotedStr(edt1.text)+''' and 元器件ID='''+(edt4.text)+''''); //语法错误操作符丢失
Form1.qry_2.Open;
Form1.qry_2.SQL.Clear;
Form1.qry_2.SQL.Add(' select * from RC1 where 领货日期 between #'+FormatDateTime('yyyy-mm-dd',edt2.date)+'# and #'+FormatDateTime('yyyy-mm-dd',edt3.date)+'# and 领货人='''+QuotedStr(edt1.text)+''' and 元器件ID='''+(edt4.text)+''''); //语法错误操作符丢失
Form1.qry_2.Open;
Form1.qry_2.SQL.Clear;
Form1.qry_2.SQL.Add(' select * from RC1 where 领货日期 between :d1 and :d2 and 领货人=:per and and 元器件ID=:id');
Form1.qry_2.parameters.parambyname('d1').value :=strtodate(FormatDateTime('yyyy-mm-dd',edt2.date));
Form1.qry_2.parameters.parambyname('d2').value :=strtodate(FormatDateTime('yyyy-mm-dd',edt3.date));
Form1.qry_2.parameters.parambyname('per').value :=edt1.text;
Form1.qry_2.parameters.parambyname('id').value :=edt4.text;
Form1.qry_2.Open;
' select * from RC1 where 领货日期 between #'+FormatDateTime('yyyy-mm-dd',edt2.date)+'# and #'+FormatDateTime('yyyy-mm-dd',edt3.date)+'# and 领货人='+QuotedStr(edt1.text)+' and 元器件ID='''+(edt4.text)+'''';
Form1.qry_2.SQL.Clear;
Form1.qry_2.SQL.Add(' select * from RC1 where 领货日期 between #'+FormatDateTime('yyyy-mm-dd',edt2.date)+'# and #'+FormatDateTime('yyyy-mm-dd',edt3.date)+'# and 领货人='+QuotedStr(edt1.text)+' and 元器件ID='''+(edt4.text)+''''); //语法错误操作符丢失
Form1.qry_2.Open;