Subject | Re: [IBO] Integer Field in Delphi |
---|---|
Author | Helen Borrie |
Post date | 2003-08-27T23:39:21Z |
At 09:16 PM 27/08/2003 +0000, you wrote:
that, test SQLScale to determine whether it is (by its DDL definition) an
integer type (smallint, integer or a 64-bit integer type).
if cursor1.fields[0].SQLScale = 0 then....
You need the IsNumeric test because many non-numeric types also have zero
scale.
Helen
>Hi all.Yes, you can use it to determine whether the field is numeric. Then, after
>
> I'd like to test in delphi (using TIB_Cursor or TIB_Query) if a
>Database (Firebird 1.5) field is an integer field like this:
>
> if cursor1.fields[0].IsInteger then...
>
> But the "IsInteger" is not available. I found IsNumeric but I can
>use it to test Integer fields or Float fieds?
that, test SQLScale to determine whether it is (by its DDL definition) an
integer type (smallint, integer or a 64-bit integer type).
> What do I use to test Integer fields?if cursor1.fields[0].IsNumeric then
if cursor1.fields[0].SQLScale = 0 then....
You need the IsNumeric test because many non-numeric types also have zero
scale.
Helen