- VB.NET code
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
各位高手求解啊
------解决方案--------------------------------------------------------
你的countNum是int 类型?那么你数据库中估计没值默认存的0 。。程序就不清楚了。。。
------解决方案--------------------------------------------------------
base.FindDbInfo("UserPlanService", "GetHelperCheck", ht) 这是个什么类型啊。会不会是转换时出现的问题
------解决方案--------------------------------------------------------
if(Convert.ToInt32(helperCheck.Rows[0]["countNum"].ToString())>=1)
------解决方案--------------------------------------------------------
DataTable helperCheck =base.FindDbInfo("UserPlanService", "GetHelperCheck", ht) as DataTable;
这个DataTable获取几行数据,如果是多行,可能helperCheck.Rows[0]["countNum"]就>1呢
------解决方案--------------------------------------------------------
设断点跟踪调试一下,看实际数据情况