首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

2014-06-01 
C#怎样判断picture字段中没有保存有任何picture文件? stringstrSqlselecttop1picturefromM_StitchTypewh

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 是不是要用==呢?

热点排行