Subject | Re: [IBO] Fields[xx].value - unidentifyed type: 14 |
---|---|
Author | Geoff Worboys |
Post date | 2001-01-04T12:11:42Z |
> > VT_DECIMAL = 14; { [V][T] [S] 16 byteI have presumed that Jason copied his variant support from db.pas
>
> Jason, are you awaken at 4 AM? :-) Type 14 is 16 byte
> fixed point, how is it related to INT64?
where you will find...
function TLargeintField.GetAsVariant: Variant;
begin
if IsNull then
Result := Null else
begin
TVarData(Result).VType := VT_DECIMAL;
Decimal(Result).lo64 := GetAsLargeInt;
end;
end;
If you search the VCL online help (Delphi 5), for TLargeIntField you
will find...
"Use Value when you know the field component is a 64-bit integer
field".
The point being that IBOs handling of int64 is consistent with
TDataset. Whether this is right or wrong, good or bad is a different
story altogether.
My own opinion is: Variant does not support int64 for all
functionality, so variant should be avoided where int64 values are
used. To cover those cases where variant must be used, perhaps we
should consider changing IBOs implementation to provide
int64-to-variant conversion as string values, which may avoid some of
these problems.
Geoff Worboys
Telesis Computing