Subject Re: [IBO] 64 bit integers in ID fields?
Author Helen Borrie
At 12:12 PM 27-03-01 +1200, you wrote:
>Hi,
>
>I am just looking at using IB 6... I read that generators now return 64 bit
>integers. Is it therefore logical to make all my Id fields 64 bit integers?

If you are using generators with IB6, it is not only "logical" to use 64-bit integers, it is necessary, as IB6 generators are 64-bit.

>I don't see a new Int 64 datatype, and it appears as though Integer is still
>a 32 bit datatype, so does that mean I would need to use Numeric(18, 0)??

Yes. The simplest way to do it is define a domain for it. I suggest not naming the domain Int64, since this is highly likely to be the name that Firebird will use for its 64-bit integer notional data type and one would want to avoid a name conflict in ones upgrade path.

Oh, btw, Delphi 5 is quite happy to let you cast your Numeric(18,0) columns as integer, as long as they are in range. Just avoid dealing with them in your app as Int64 if you are using the VCL-compatible components. If you are using IBConsole for your interactive work, it may have problems with SET GENERATOR (unless this has been resolved since I last used IBConsole some months ago...)

Cheers,
Helen


>Is changing to this a waste of time, any performance penalties over just
>using integer?
>
>Thanks for any advice.
>
>Regards
>
>Colin
>
>
>######################################################################
>Attention:
>The information in this email and in any attachments is confidential.
>If you are not the intended recipient then please do not distribute,
>copy or use this information. Please notify us immediately by return
>email and then delete the message from your computer.
>Any views or opinions presented are solely those of the author.
>######################################################################
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________