Subject Re: Problem with Locate
Author tremel@tremel-computer.de
> I get an error "invalid variant operation" in function
> TIB_BDataset.SysLocateRecord. When qry.FieldValues['Foerderernr']
is
> null then both KVal and FVal is unassigned. tmpResult becomes True
by
> tmpResult := not (( VarIsEmpty( KVal ) or VarIsNull(
> KVal )) xor
> ( VarIsEmpty( FVal ) or VarIsNull(
> FVal )));
>
> In the line
> tmpResult := tmpResult and ( KVal = FVal );

The following fix does work for me:
else begin // Tremel 17.9.01
if not (VarIsEmpty(KVal) and VarIsEmpty(FVal)) then
tmpResult := tmpResult and ( KVal = FVal );
end;