Subject FB 2.1 - ClientDataset Date Param - SQL error code = -303
Author Sergio H. Gonzalez
Hi, I'm getting his error when I try to send some parameters to a CDS.
I'm using Delphi 6.

Thanks!

ERROR:
SQL error code = -303 conversion error from string "2000-01-01"

MY CODE:
cdsDatos.Params[0].AsInteger := -1;
cdsDatos.Params[1].AsDate := EncodeDate(2000,1,1);
cdsDatos.Params[2].AsDate := EncodeDate(2010,1,1);

MY SELECT:
select
[...]
where
((fac_com.id_proveedor = :id_proveedor) or (:id_proveedor = -1)) and
(fac_com.fecha between :FechaDesde and :FechaHasta)

The field "fecha" is DATE NOT NULL

Thanks!!