if ADOQuery1.Recordset.Fields[1].IsNull then

解决方案 »

  1.   

    if   ADOQuery1.FieldByName('aa').IsNull then
      showmessage('空');
      

  2.   

    来迟了.再给一种另类答案:
    有时候没有数值它也不会为空,此时:
    if   ADOQuery1.FieldByName('aa').ASString='' then
      showmessage('空');
      

  3.   

    if ADOQuery1.Recordset.Fields[1].IsNull then或
    if ADOQuery1.FieldByName('fieldname').IsNull then
      

  4.   

    VarIsNull(ADOQuery1.FieldByName('fieldname').Value;
    VarIsEmpty();
      

  5.   

    我这样写就不行:
    if ADOQuery1.Recordset.Fields[1].IsNull then
    如果该成这样:
    if   ADOQuery1.FieldByName('aa').IsNull then
    就可以了?
    这怎么回事?我用的DELPHI6