Subject Re: Cant Insert DateTime to TimeStamp Field (FireBird)
Author Adam
--- In, "dilish_tv" <dilish_tv@y...>
> Thanks For the Quick Reply
> Error Message is :
> Arguments are of Wrong Type or out of Acceptable range or Are Conflict
> with One Another.
> ---------------------
> Here is the Code:-
> AdoQry.Parameters.ParamByName('Prm0').DataType:= ftTimeStamp;
> AdoQry.Parameters.ParamByName('Prm0').Value :=
> VarToDateTime(RSt.Fields['S_DATE'].Value);
> ---------------------
> RSt.Fields['S_DATE'] is a DateTime Field in MSAccess

Where does the exception get raised? If it is when you are assigning
the parameters, it is a Delphi exception, you could try something like.

AdoQry.Parameters.ParamByName('Prm0').AsDateTime :=

Of course if the field contained any NULLs, then those records would
be given a date (1899 or 1758 or something like that) when you call

so you could do something like

if RSt.FieldByName('S_DATE').IsNull then
else AdoQry.Parameters.ParamByName('Prm0').AsDateTime :=

And see if that helps.

Delphi implements timestamps/datetimes as a floating point number, so
it is impossible to get the MySQLish scenario of 30 Feb or some other
impossible date, I am not sure is Access also happily stores illegal