Subject Re: Accessing "Numeric (18,0)" fields via FieldByName
Author Marco Menardi
--- In IBObjects@yahoogroups.com, "Pelle F. S. Liljendal" <pelle@l...>
wrote:
> Previously I have been using an "INTEGER" field as a PK in all of my
> tables (based on a generator per table). However in some of my
> tables I exprect to see A LOT work (adding/deleting of MANY records)
> and compared with a LARGE database, I am affraid that I in a not so
> far future might "grow beyond the limits of Integer" (PK value
> bigger than 2^32).
>
> In this aspect I have begun replacing my Integers with "Numeric
> (18,0)" (64 bit Integer). My problem is than when I in my delphi
> application (Delphi 7 Enterprise) needs to access this value I am
> missing a "AsInt64" method (e.g. Int64Var = qSomeData.FieldByName
> ('SomeField').AsInt64;). Also I guess I will run into the same
> problem using parameters (ParamByName). I am going to use these 64
> bit intager variables both with IBOxxx and IB_xxx components.
>
> Any ides how I access these 64 bit integer values ?
I only use native (IB_xxx) components, and I've all PKs defined as
NUMERIC(18,0). There is no problem at all in access that value, not
with FieldByName, nor in ParamByName, since AsInt64 method is defined
for both.
What is your problem? What version of IBO are you using? (me the latest).
regards
Marco Menardi