sql.Format(_T("select a.code,a.name,b.nownum,b.maxnum,b.minnum from tb_mat_code a , tb_mat_inventory b where a.code='%s' and b.code='%s'"),c_code);//选择两个数据库表中code字段值为c_code的记录.
没细看,你的参数不匹配,where a.code='%s' and b.code='%s'"),c_code,这里少个参数
sql.Format(_T("select a.code,a.name,b.nownum,b.maxnum,b.minnum from tb_mat_code a , tb_mat_inventory b where a.code=\'%s\' and b.code=\'%s\'"),c_code, c_code);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货