[Lazarus] Lazarus is not installable in FreeBSD 7.2 or 8.0
Mehmet Erol Sanliturk
sanliturk at ttmail.com
Fri Dec 11 12:21:05 CET 2009
On Thu, 10 Dec 2009, Paul van Helden wrote:
> Hi All,
>
> A client has changed a field type in a SQLite db from INTEGER to TEXT. My app
> now crashes on a AField.AsInteger:=1; (Invalid type conversion to integer in
> field...)
>
> Should the correct behaviour not be to simply convert to text in the
> AsInteger setter and attempt StrToInt in the getter before raising an
> exception?
First of all, your client should not change the field type.
If you use persistent fields, opening the dataset will go wrong, as a
TIntegerField is declared, and the query will expect a TStringField to be
present.
As for attempting to converting string fields to integer, this is debatable;
I'm not particularly against it, but I'm not yet sure of all the
consequences.
Please post a feature request in the FPC bugtracker.
Michael.
More information about the Lazarus
mailing list