Subject Re: [IBO] DML Caching
Author Jason Wharton
Assigning it from AsInt64 in Delphi 6 didn't work. I am using AsExtended and
this seems to work fine.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Geoff Worboys" <geoff@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, August 31, 2001 3:48 AM
Subject: Re: [IBO] DML Caching


> > I think that is precisely right. If that is the
> > case presumably it may be as simple as providing
> > a AsLargeInt or GetAsLargeInt within IBO.
>
> All that is required to perform the equivalent action is to edit
> IBA_Column.IMP and edit the function...
>
> function TIB_Column.GetAsVariant: Variant;
> begin
> Result := Unassigned;
> if not IsNull then case SQLType of
> SQL_VARYING,
> SQL_VARYING_,
> SQL_TEXT,
> SQL_TEXT_: Result := AsString;
> SQL_FLOAT,
> SQL_FLOAT_: Result := AsFloat;
> SQL_DOUBLE,
> SQL_DOUBLE_: Result := AsDouble;
> SQL_SHORT,
> SQL_SHORT_: if SQLScale = 0 then begin
> Result := AsSmallint;
> end else begin
> Result := AsExtended;
> end;
> SQL_LONG,
> SQL_LONG_: if SQLScale = 0 then begin
> Result := AsInteger;
> end else begin
> Result := AsExtended;
> end;
> SQL_QUAD,
> SQL_QUAD_,
> SQL_INT64,
> SQL_INT64_: if SQLScale = 0 then
> begin
> {$IFDEF IBO_VCL60_OR_GREATER} // NEW
> Result := AsInt64; // NEW
> {$ELSE} // NEW
> {$IFDEF IBO_VCL40_OR_GREATER}
> TVarData(Result).VType := VT_DECIMAL_X;
> tagDEC_X(Result).lo64 := AsInt64;
> {$ELSE}
> Result := AsExtended;
> {$ENDIF}
> {$ENDIF} // NEW
> end
> <etc>
>
> you can see the inserted lines marked with "// NEW" above. That will
> give you the equivalent to what the VCL is doing. This does NOT mean
> that it will definitely work when inserted into a variant array (in
> fact I suspect it will not) but it is work a try to see what happens.
>
> (Note: I suspect that the full fix will require more changes, but the
> above should let us know whether this fixes your particular problem.)
>
> Let me know how it goes.
>
> Geoff Worboys
> Telesis Computing