我有以下代码;
Dm.QrTmp.SQL.Add('(Select sum (sth.sth_tutar+sth.sth_vergi) from
'+MikActiveDb+'STOK_HAREKETLERI sth ');
Dm.QrTmp.SQL.Add('where (sth.sth_tarih>= :ptar1 and sth.sth_tarih<= :ptar2) ');
我设置了这样的参数。
Dm.QrTmp.Parameters.ParamByName('ptar1').DataType := ftDate;
Dm.QrTmp.Parameters.ParamByName('ptar2').DataType := ftDate;
Dm.QrTmp.Parameters.ParamByName('ptar1').Value := Tarih1.Value;
Dm.QrTmp.Parameters.ParamByName('ptar2').Value := Tarih2.Value;
但是在运行时delphi给我一个错误;
Parameter object is improperly defined. Inconsistent or incomplete information was provided.