DataTable helperCheck =base.FindDbInfo("UserPlanService", "GetHelperCheck", ht) as DataTable;
if (Int32.Parse(helperCheck.Rows[0]["countNum"].ToString()) >=1)
    {
        katsutouLabel.Text = "未";
        katsutouLabel.CssClass = "h12l22_red";
    }
在LOG中生成的SQL文贴在OB中执行
helperCheck.Rows[0]["countNum"]的结果等于0
但是在程序中helperCheck.Rows[0]["countNum"]等于1各位高手求解啊

解决方案 »

  1.   

    你的countNum是int 类型?那么你数据库中估计没值默认存的0 。。程序就不清楚了
      

  2.   

    base.FindDbInfo("UserPlanService", "GetHelperCheck", ht) 这是个什么类型啊。会不会是转换时出现的问题
      

  3.   

    if(Convert.ToInt32(helperCheck.Rows[0]["countNum"].ToString())>=1)
      

  4.   

    DataTable helperCheck =base.FindDbInfo("UserPlanService", "GetHelperCheck", ht) as DataTable;
    这个DataTable获取几行数据,如果是多行,可能helperCheck.Rows[0]["countNum"]就>1呢