Subject | Re: [IBO] DML Caching |
---|---|
Author | Geoff Worboys |
Post date | 2001-08-31T10:48:46Z |
> I think that is precisely right. If that is theAll that is required to perform the equivalent action is to edit
> case presumably it may be as simple as providing
> a AsLargeInt or GetAsLargeInt within IBO.
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