[fpc-pascal] Postgresql interface bronken for Raspberry pi model 1b

Michael Van Canneyt michael at freepascal.org
Mon Mar 28 10:27:03 CEST 2016

On Mon, 28 Mar 2016, Björn Lundin wrote:

> Hi!
> I'm using a pi as a monitor for some process, so I'm trying to get SDL2
> and a working postgres interface on it.
> However I'm running into trouble on timestamps fields on the pi.


>  Q2.Prepare;
>  //Q2.Params.ParamByName('DT').DataType := ftDateTime;
>  Q2.Params.ParamByName('DT').Value := now;             <----Here
>  Q2.ExecSql;

Don't use Value for parameters.

Always use .AsDateTime or whatever the actual type is supposed to be.


More information about the fpc-pascal mailing list