[fpc-pascal] "Invalid field size" when using UIB with fpc 2.3.1
Joost van der Sluis
joost at cnoc.nl
Mon Sep 8 23:04:06 CEST 2008
Op maandag 08-09-2008 om 16:13 uur [tijdzone +0200], schreef Lukas
> Just had to upgrade to fpc 2.3.1 for some reason.
> But using fpc 2.3.1 UIB produces an "Invalid field size" error when
> trying to open a UIBDataset.
It's a bug in UIB. But it's a bug that most TDataset-descendents suffer
from. That's because the bug is hidden in Delphi. It is also hidden in
fpc's released versions, because it causes too much trouble. But this
"bug" does pop-ups in the development version. Until all
TDataset-descendents I know of have fixed it, it will be hidden in
released versions, though.
> The same program works when using fpc 2.2.3.
> For demonstrating the problem I created the following program:
> When trying to open an UIBDataset I get an error: "EDatabaseError :
> Invalid field size : 4828"
Which is true, 4828 is an invalid field-size for an integer-field. I
guess that UIB doesn't set the field-size properly. In fact, the
'field-size' property should contain the amount of decimals in this
case. So the field-size should be set to 0.
Maybe you can look it up in UIB where it's set?
More information about the fpc-pascal