if dbgrid1.fields[1].asstring=null then
  begin
     showmessage('没有发现您要修改或删除的记录,请重新选择记录!');
     exit;
  end;
上面这句在另外一个程序1中可以正常运行.
程序2中用时就提示"project cp.exe raised exception class evariant typecasterror with message'could not convert variant of type(null) into type(string),"我用的ACCES数据库这段代码是用在删除之前的.有两个字段一个是编号ACCES自动的,一个是文本的可以有空值.