sql语句在sql server 2008中可以运行有数据, 但在C#程序中查询不到数据? 5
SELECTDataIdFROMIWF_FlowDataWHERE(FlowIdIN(SELECTIdFROMIWF_FlowInstanceWHERE(FlowType...
SELECT DataId FROM IWF_FlowData WHERE (FlowId IN (SELECT Id FROM IWF_FlowInstance WHERE (FlowType = '27') AND (Supervisor LIKE '%1407%') AND (CurNode = '100')))
啥问题啊,同样的语句到程序里面运行就不行了?调试数据记录也是0
string sqlR = "SELECT DataId FROM IWF_FlowData WHERE (FlowId IN (SELECT Id FROM IWF_FlowInstance WHERE (FlowType = '27') AND (Supervisor LIKE '%1407%') AND (CurNode = '100')))";
string strCon = System.Configuration.ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;
SqlConnection myConn = new SqlConnection(strCon);
myConn.Open();
SqlDataAdapter da = new SqlDataAdapter(sqlR, strCon);
DataTable dtR = new DataTable();
da.Fill(dtR); 展开
啥问题啊,同样的语句到程序里面运行就不行了?调试数据记录也是0
string sqlR = "SELECT DataId FROM IWF_FlowData WHERE (FlowId IN (SELECT Id FROM IWF_FlowInstance WHERE (FlowType = '27') AND (Supervisor LIKE '%1407%') AND (CurNode = '100')))";
string strCon = System.Configuration.ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;
SqlConnection myConn = new SqlConnection(strCon);
myConn.Open();
SqlDataAdapter da = new SqlDataAdapter(sqlR, strCon);
DataTable dtR = new DataTable();
da.Fill(dtR); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询