C# sql 查询语句 where 等于一个参数总是出错
SqlConnectioncnn=newSqlConnection();//实例化一个连接cnn.ConnectionString="DataSource=.;Initi...
SqlConnection cnn = new SqlConnection();//实例化一个连接 cnn.ConnectionString = "Data Source=.;Initial Catalog=DDCX;Integrated Security=True;Pooling=False";//设置连接字符串 cnn.Open();//打开数据库连接 SqlDataAdapter da = new SqlDataAdapter();//实例化sqldataadpter string sqlQuery = "select 编号ID,订单状态 from DingDanMsg where 编号ID=BHID333"; SqlCommand cmd1 = new SqlCommand(sqlQuery, cnn); da.SelectCommand = cmd1; DataSet ds1 = new DataSet(); da.Fill(ds1);
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询