请大家再看看这条语句 int m_a=20; int m_b=60; m_oper.Format("use NewDatabase DELETE FROM "+m_talenamestr[i]+" WHERE (ID<("m_a"))and (ID>("m_b"))"); 这一条报错啊,用VC++怎么表示,求正确方法。
ID <("m_a")为什么要用""号
m_oper.Format("use NewDatabase DELETE FROM %s WHERE (ID <%d)and (ID>%d)",m_talenamestr[i],m_a,m_b);
基础问题啊,既然用了format,就要知道用%s与字符串变量匹配或者%d与整型变量相匹配。。
and 不行,要OR ----------------------------------------------- http://www.wantsoft.com 隐形者软件代码交流博客 -----------------------------------------------
CString str; str.Format("DELETE FROM %s WHERE ID>%d OR ID <%d", m_talenamestr[i], m_a, m_b) //DELETE * 是什么语句?
int m_a=20;
int m_b=60;
m_oper.Format("use NewDatabase DELETE FROM "+m_talenamestr[i]+" WHERE (ID<("m_a"))and (ID>("m_b"))");
这一条报错啊,用VC++怎么表示,求正确方法。
-----------------------------------------------
http://www.wantsoft.com
隐形者软件代码交流博客
-----------------------------------------------
str.Format("DELETE FROM %s WHERE ID>%d OR ID <%d", m_talenamestr[i], m_a, m_b)
//DELETE * 是什么语句?
Delete from,没有*
2.
用Or而不是and