Subject | Accessing "Numeric (18,0)" fields via FieldByName |
---|---|
Author | Pelle F. S. Liljendal |
Post date | 2003-11-02T12:10:34Z |
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 ?
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 ?