[Lazarus] Trouble with TIBConnection and Numeric (N,6) fields.

Joost van der Sluis joost at cnoc.nl
Mon May 26 23:51:58 CEST 2008


Yes. It's in packages/fcl-db/src/base/fields.inc and db.pp. You can take
the 'TBCDField' as an example (ie: copy-paste it). Main difference is
that the data of the field shoudn't get stored in an TCurrency, but in a
TFmtBCD. You have to add the unit which implements TFmtBCD for this to
the uses-clause of the db-unit. (This unit is new, that's why it wasn't
implemented before)

If you did this, you should add the TFmtDCBField support in
packages/fcl-db/src/sqldb/interbase/ibconnection.pp. Just take the
TBCDField-code as an example again.

If you have any questions, you can ask them here. Good luck!

Joost.

Op maandag 26-05-2008 om 09:12 uur [tijdzone +0200], schreef Gerard N/A:
> Ok, thanks.
> I've been looking into LCL code, but I guess this is belongs to FPC's source?
> 
> Gerard.
> 
> On Sun, May 25, 2008 at 3:06 PM, Joost van der Sluis <joost at cnoc.nl> wrote:
> > Op vrijdag 23-05-2008 om 11:17 uur [tijdzone +0200], schreef Gerard N/A:
> >> Hi all,
> >>
> >> I've got a problem acessing a Firebird DB (2.0) with TIBConnection + TSQLQuery.
> >> I get 'Unkonwn field type <FieldName>' when opening querys wich do
> >> selects to tables having NUMERIC fields with 6 decimals.
> >>
> >> Any idea on how to fix this?
> >
> > Yes, implement TFmtBCDField. At this moment, fpc doesn't support decimal
> > fields with more then 4 decimals.
> >
> > Joost.
> >
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lazarus.freepascal.org
> > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> >
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
-- 




More information about the Lazarus mailing list