I have following code;
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) ');
I have set parameters like this.
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;
But in run time delphi give me an error ;
Parameter object is improperly defined. Inconsistent or incomplete information was provided.