....
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Text:='SELECT * FROM Total1 WHERE Data BETWEEN '+Quotedstr(datetostr(DTPicker1.Date))+ ' AND ' + Quotedstr(datetostr(DTPicker2.Date));
ADOQuery1.Prepared := True;
ADOQuery1.ExecSQL;
ADOQuery1.Open;
ADOQuery1.Active := False;
if prReport2.PrepareReport then
prReport2.PreviewPreparedReport(true);
Label1.Caption := Quotedstr(datetostr(DTPicker2.Date));
end;
end.
Please help me, mesage error is: "Data type mismach in criteria expression" .
How is posible to solve this problem?!
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Text:='SELECT * FROM Total1 WHERE Data BETWEEN '+Quotedstr(datetostr(DTPicker1.Date))+ ' AND ' + Quotedstr(datetostr(DTPicker2.Date));
ADOQuery1.Prepared := True;
ADOQuery1.ExecSQL;
ADOQuery1.Open;
ADOQuery1.Active := False;
if prReport2.PrepareReport then
prReport2.PreviewPreparedReport(true);
Label1.Caption := Quotedstr(datetostr(DTPicker2.Date));
end;
end.
Please help me, mesage error is: "Data type mismach in criteria expression" .
How is posible to solve this problem?!