Analyzing DataTale determined whether a field contains a null value

 DataRow[] dataRows = dt.Select("isnull("+ columnName  +", '') = ''");
    if (dataRows.Length > 0)
     {
           MessageBox.show("[" + columnName  + "]列包含空值数据");
            return ;
      }

  

Guess you like

Origin www.cnblogs.com/xiaoheihei/p/11388368.html