日期:2014-05-18  浏览次数:20806 次

C#怎样判断picture字段中没有保存有任何picture文件?

string   strSql   =   "select   top   1     picture     from     M_StitchType   where   StitchType= '100 ' ";
DataTable   dt   =   new   DataTable();
SqlDataAdapter   da=new   SqlDataAdapter(strSql, "数据库连接字符串 ")
da.fill(dt);
if   (dt.rows[0][0]!=null)
    {MessageBox.Show( "NO   pictue ");}
好象不行,请问这个判断条件怎样写?

------解决方案--------------------
==null
------解决方案--------------------
if (dt.rows[0][0]!=DBNull.Value)
------解决方案--------------------
他要的是no picture 是不是要用==呢?