Subject | RE: Field.AsInt64 (was Re: [IBO] How to get the record id that was just stored with a query) |
---|---|
Author | Alan McDonald |
Post date | 2005-07-01T04:25:29Z |
> > At 01:32 AM 1/07/2005 +0200, you wrote:in any case.. if you create BIGINTs on FB, you can't put them into Integer
> > >Hi Helen,
> > >
> > > > By the
> > > > way, avoid AsInt64. Use AsInteger.
> > >
> > >Why?
> >
> > I don't know the exact reason, I only know that it can cause overflow
> > problems when applied to Firebird's BigInt and IB's Int_64 (or whatever
> > they eventually called NUMERIC(18,0)). In a list somewhere, I saw that
> > Delphi introduced Int64 to support MSSQL and Oracle huge integers, which
> > have extended ranges of precision...
> >
> > It's probably OK to use it for casting, provided you don't try
> to perform
> > scale-raising calculations with those numbers. No doubt if Geoff
> > sees this
> > thread he will have more to say about it...
> >
> > Helen
>
> The only problem I have encountered is that there is no equivalent for
> Params. Jason has said that it's fine to use .AsString when
> assigning Int64
> values to Params since IBO does the conversion internally anyway.
> But Int64
> should match exactly BigInt on FB - they are both 64bit integers.
> Surely a windows client sending a 2 word value will not get reversed when
> received on a MAC???
> Alan
>
types in Delphi - they overflow when they get past Integer precision - I've
tried it. So what else can be done?
Alan