日期:2014-05-19  浏览次数:20774 次

关于绑定的问题,就20分了
string   rmtypstr   =   "select   rm_nm,rm_img,htl_cd,rm_cd   from   wwwrmtyp   where   htl_cd= ' "   +   htlcd   +   " ' ";
                SqlDataAdapter   rmtypa   =   new   SqlDataAdapter(rmtypstr,   DBConnection);
                DataSet   ds   =   new   DataSet();
                rmtypa.Fill(ds,   "rmtyp ");
                DataList3.DataSource   =   ds.Tables[ "rmtyp "].DefaultView;
                DataList3.DataBind();
                DBConnection.Close();


希望rm_img如果为空就不绑定,

现在rm_img都是空的,还是绑定上了

怎么办好呢?




------解决方案--------------------
select rm_nm,rm_img,htl_cd,rm_cd from wwwrmtyp where rm_img <> null之类操作?

要么在ds中设置视图,之后将图象不为空的筛选出来.