m_sGoods是CString ,m_sDate是CString ,对应数据库里的字段goods是文本,date1是日期型,
表名是abtable
我用
CString sql;
sql.Format("select * from abtable where date1 = #%s# and goods like'%%s%'",m_sDate,m_sGoods);我是想把同时满足这两个条件的记录选出来
但是这句有问题,请问正确的语句应该怎么写?
表名是abtable
我用
CString sql;
sql.Format("select * from abtable where date1 = #%s# and goods like'%%s%'",m_sDate,m_sGoods);我是想把同时满足这两个条件的记录选出来
但是这句有问题,请问正确的语句应该怎么写?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货