ASP+spl运行时候出错
 bool blrefine =Convert.ToBoolean(this.cbxCommend.Checked);        
        bool blHot = Convert.ToBoolean(this.cbxHot.Checked);              
        bool blDiscount = Convert.ToBoolean(this.cbxDiscount.Checked);
        string strSql="select * from tb_BookInfo where BookName='"+strBookName+"'and Author='"+strAuthor+"'and Company='"+strCompany+"'";
        DataTable dsTable=dbObj.GetDataSetStr(strSql,"tbBI");其中 blrefine blHot blDiscount在Sql里为bit型,默认值为(1)

解决方案 »

  1.   


    select case when colname='True' then '1' else 0 end from t where  case when colname='True' then '1' else 0 end=1
      

  2.   

    bool blrefine =Convert.ToBoolean(this.cbxCommend.Checked);改为:int blrefine=this.cbxCommend.Checked?1:0
      

  3.   

     
    bool blrefine =Convert.ToBoolean(this.cbxCommend.Checked);       
            bool blHot = Convert.ToBoolean(this.cbxHot.Checked);             
            bool blDiscount = Convert.ToBoolean(this.cbxDiscount.Checked);
            string strSql="select * from tb_BookInfo where BookName='"+strBookName+"'and Author='"+strAuthor+"'and Company='"+strCompany+"'";
            DataTable dsTable=dbObj.GetDataSetStr(strSql,"tbBI");
    查詢用具沒有看到你用到這幾個bool?
      

  4.   

    沒有看到你設置的bool變量在什么地方用到?