冰
冰冷的雨
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
(OnCodeBeforeScroll)
with DataSetdo
if VarIsEmpty(DieldByName('iCode').Value)
or VarIsEmpty(DieldByName('cText').Value) then
begin
ShowMessage('请输入代码');
abort;
end
else
ShowMessage(inttostr(FieldByName('iCode').Value)+' '
+FieldByName('iCode').Value;
为什么当cText没有内容时,两个ShowMessage都不执行,而iCode没有内容时会出错:Could not convert variant of type (Null) into
type (Integer)?
(OnCodeBeforeScroll)
with DataSetdo
if VarIsEmpty(DieldByName('iCode').Value)
or VarIsEmpty(DieldByName('cText').Value) then
begin
ShowMessage('请输入代码');
abort;
end
else
ShowMessage(inttostr(FieldByName('iCode').Value)+' '
+FieldByName('iCode').Value;
为什么当cText没有内容时,两个ShowMessage都不执行,而iCode没有内容时会出错:Could not convert variant of type (Null) into
type (Integer)?