asp.net的数据库连接问题

琉璃冰灵 琉璃冰灵 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
MySQLConnection conn = new MySQLConnection(new MySQLConnectionString("192.168.0.56", "antshop", "root", "qwe123").AsString);
conn.Open();
string sql = "SELECT a.salesman,SUM(b.qty/b.qtyOfPackage),b.expiryDate FROM saleorderbill a,saleorderbilldetail b,brand c,goods d WHERE a.billCode=b.billCode AND b.goods_id=d.id AND d.brand_id=c.id AND b.money<>0 AND a.salesman='刘俊斌' GROUP BY a.salesman,c.`name`,b.expiryDate";
MySQLCommand comm = new MySQLCommand(sql, conn);
comm.ExecuteNonQuery();
MySQLDataAdapter da = new MySQLDataAdapter();
da.SelectCommand = comm;
DataSet ds = new DataSet();
da.Fill(ds);

为什么运行的时候ds中没有想要的数据,哪里出了问题?
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
琉璃冰灵
.NET社区 62,275 成员 668,968 内容