Subject | Re: [IBO] DML Caching |
---|---|
Author | mkl20uk@yahoo.co.uk |
Post date | 2001-08-29T14:10:33Z |
Helen
Thanks for the quick response. SystemRef is a property of MainForm
and reads an Int64 variable. I can't therefore use AsInteger but
using .Value has no effect - the error is still generated. From the
error message it is to do with a Variant conversion and the error
occurs in IBA_Row.IMP within TIB_Row.GetColumnValue, the error occurs:
...
tmpColumns := TList.Create;
try
GetColumnList( tmpColumns, ColumnName );
Result := VarArrayCreate( [0, tmpColumns.Count - 1],
varVariant );
for I := 0 to tmpColumns.Count - 1 do
Result[I] := TIB_Column( tmpColumns[I] ).AsVariant; <===ERROR
finally
tmpColumns.Free;
end;
...
I am using Delphi6 and IBO4.
Martin
Thanks for the quick response. SystemRef is a property of MainForm
and reads an Int64 variable. I can't therefore use AsInteger but
using .Value has no effect - the error is still generated. From the
error message it is to do with a Variant conversion and the error
occurs in IBA_Row.IMP within TIB_Row.GetColumnValue, the error occurs:
...
tmpColumns := TList.Create;
try
GetColumnList( tmpColumns, ColumnName );
Result := VarArrayCreate( [0, tmpColumns.Count - 1],
varVariant );
for I := 0 to tmpColumns.Count - 1 do
Result[I] := TIB_Column( tmpColumns[I] ).AsVariant; <===ERROR
finally
tmpColumns.Free;
end;
...
I am using Delphi6 and IBO4.
Martin
--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> At 01:03 PM 29-08-01 +0000, you wrote:
> >OnNewRecord handler:
> >With IB_Dataset do
> > FieldByName('PCAT_SYSTEM_REF').AsInt64 := MainForm.SystemRef;
>
> Here is where the variant conversion problem is. My guess is that
your SystemRef variable is not a variant, right? Try changing the
code to ...).AsInteger := ....
> or, failing that ...).Value := ....
>
_______________________________________________________