这个问题怎么办,高手近来帮帮忙吧!(关于DBGridEH2.4)
rzg 2002-11-07 04:42:04 我在使用TDBLookupEH时候,当我关联ListSource之后总是出现莫名其妙的错误!错误的地方在下面的代码中:
function TCustomDBLookupComboboxEh.LocateKey: Boolean;
var
KeySave: Variant;
begin
Result := False;
try
KeySave := FKeyValue;
if not VarIsEmpty(FKeyValue) then
if not VarIsNull(FKeyValue) then
if FListLink.DataSet<>nil then
if FListLink.DataSet.Active then
if CompatibleVarValue(FKeyFields, FKeyValue) then
if FListLink.DataSet.Locate(FKeyFieldName, FKeyValue, []) then
begin
Result := True;
FKeyValue := KeySave;
end;
except
end;
end;
中的“if FListLink.DataSet.Locate(FKeyFieldName, FKeyValue, []) then
”这一句。为什么呀?