On 2016-03-28 10:27, Michael Van Canneyt wrote: > > > On Mon, 28 Mar 2016, Björn Lundin wrote: >> However I'm running into trouble on timestamps fields on the pi. > > [snip] > >> 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. > > Michael. >
Thanks for the reply. Unfortuantly, it does not help. Changing the line to Q2.Params.ParamByName('DT').AsDateTime := now; works on win7/32 bit C:\\pascal\pg_test_float>test_float.exe A: 1 B: 1.0000000000000000E+000 C: 4.2457521073587959E+004 round(B): 1 round(C): 42458 but not on the pi. pi@raspberrypi ~$ ./test_float An unhandled exception occurred at $0003028C : EDatabaseError : : Unknown fieldtype for parameter "DT". $0003028C $0001C488 $00020DA0 $00008750 pi@raspberrypi ~$ addr2line -e ./test_float 0003028C 0001C488 00020DA0 00008750 /home/pi/svn/bnlbot/botstart/bot-1-0/source/pascal/test_float.lpr:85 /home/pi/svn/bnlbot/botstart/bot-1-0/source/pascal/test_float.lpr:85 /home/pi/svn/bnlbot/botstart/bot-1-0/source/pascal/test_float.lpr:85 /home/pi/svn/bnlbot/botstart/bot-1-0/source/pascal/test_float.lpr:57 where 57 is the line I changed -- -- Björn _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal