Page 1 of 1
Unknown Param.DataType exception
Posted: 08.07.2016, 04:36
by papelhigienico
Hi!
I'm using ZStoredProc component with a LargeInt parameter on Lazarus Linux. When my program execute ZStoredProc.ExecProc, a exception "Unknown Param.DataType", raised near of line 302 of file ZStoredProcedure.pas
So I started check my Lazarus/Freepascal sources and configurations and everything is OK, except that ZeosLazarus.inc don't have a
{$DEFINE WITH_PARAM_ASLARGEINT}
To enable this. I changed here and everything worked fine.
I can't determine which FPC version implements TParam.AsLargeInt, but in FPC revision 4009 is implemented.
So, is possible to fix this?
Re: Unknown Param.DataType exception
Posted: 08.07.2016, 13:24
by marsupilami
Hello papelhigienico,
I am sure, we can find out and implement it. Could you please let us know which Version of FPC you use? Do you use something from their SVN, maybe trunk? Or do you use a downloaded version?
With best regards,
Jan Baumgarten
Re: Unknown Param.DataType exception
Posted: 08.07.2016, 15:13
by miab3
@papelhigienico,
WITH_PARAM_ASLARGEINT is used for Delphi 2009 and above.
Perhaps it should also be for fpc / lazarus but you need to specify which version you are using(fpc/Lazarus, ZEOS, database, OS?).
Michal
Re: Unknown Param.DataType exception
Posted: 08.07.2016, 20:27
by papelhigienico
Hi!
My configuration
FPC: 3.1.1 built from sources of 2016-04-20;
Lazarus: 1.7 revision 52208
Zeoslib 7.2.1-rc get from
http://svn.code.sf.net/p/zeoslib/code-0/trunk/src (outdated?)
Database: PostgreSQL 9.3
OS: Linux Mint 17.3 amd64
I checked the sources of Zeoslib 7.3 and on this, the define WITH_PARAM_ASLARGEINT was missing too.
I searched on FPC releases, and TParam.AsLargeInt first appears on FPC 2.0.4. So a conditional direct {$IF FPC_FULLVERSION>=20004}{$DEFINE WITH_PARAM_ASLARGEINT}{$IF_END} should be used to solve this, unless that FPC 2.0.x is not supported.
The best regards,
Fabio
Re: Unknown Param.DataType exception
Posted: 12.07.2016, 09:41
by marsupilami
Hello Fabio,
I included the define in the ZeosLazarus.inc so it now should be part of any Zeos 7.2 build. Since Zeos 7.2 has a define in place that says it doesn't support FPC versions below 2.2.4, I didn't bother with any more conditionals there
You can heckout the current Zeos 7.2 from
http://svn.code.sf.net/p/zeoslib/code-0 ... esting-7.2. Currently most development happens there and later on gets merged into Zeos 7.3 and trunk because we concentrate on bugfixes currently.
With best regards,
Jan
Re: Unknown Param.DataType exception
Posted: 14.07.2016, 01:30
by papelhigienico
I'll download and test. Thanks!
Re: Unknown Param.DataType exception
Posted: 14.07.2016, 02:08
by papelhigienico
Appears to be OK, working fine...