Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread AsLargeInt
Tue, Apr 24 2007 11:08 AMPermanent Link

Is there a way to get and set a field as a LargetInt / Int64? At the
moment I'm reading the field using FieldByName('MyField').AsString because
AsInteger is a 32 bit integer and I know I need Int64. Pointers to
solutions welcome. Thanks!

/Matthew Jones/
Tue, Apr 24 2007 1:36 PMPermanent Link

Sean McCall
Internally I call them serial numbers and have a type Serial =
TLargIntField. You should get the idea:

function ValueSerial(AValue: TField): Serial;
begin
  if AValue is TLargeIntField then begin
    Result := TLargeIntField(AValue).AsLargeInt;
    end {if large integer field}
  else begin
    Result := AValue.AsInteger;
  end; {if not a large integer field}
end; {procedure}


mattjones@cix.co.uk (Matthew Jones) wrote:
> Is there a way to get and set a field as a LargetInt / Int64? At the
> moment I'm reading the field using FieldByName('MyField').AsString because
> AsInteger is a 32 bit integer and I know I need Int64. Pointers to
> solutions welcome. Thanks!
>
> /Matthew Jones/
Wed, Apr 25 2007 1:47 AMPermanent Link

"Ralf Bieber"
Matthew Jones wrote:

Hi Jones

> Is there a way to get and set a field as a LargetInt / Int64? At the
> moment I'm reading the field using FieldByName('MyField').AsString
> because AsInteger is a 32 bit integer and I know I need Int64.
> Pointers to solutions welcome. Thanks!
>
> /Matthew Jones/

MyInt64 :=FieldByName('MyField').Value;

Ralf



--
Wed, Apr 25 2007 4:18 AMPermanent Link

Does that really work? What is a Value - is it a variant? I'll have to go
look.

/Matthew Jones/
Wed, Apr 25 2007 8:43 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Does that really work? What is a Value - is it a variant? I'll have to go
look.>>

Yep, it's a variant.  However, I believe only D6 and above support Int64
variants.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 25 2007 10:51 AMPermanent Link

I'm using D7 or D2007 so that will be good. I'll use that then.

/Matthew Jones/
Image