+ -
当前位置:首页 → 问答吧 → 数据库更新语句无法执行

数据库更新语句无法执行

时间:2011-12-02

来源:互联网

strsql.Format(_T("update student set student_name='ee33388' where student_score = %s "), m_Value);
这条语句无法执行 请高手指点

作者: suren321   发布时间: 2011-12-02

strsql.Format(_T("update student set student_name='ee33388' where student_score = %s "), m_Value);
看样子student_score 应该是字符串类型啊,应该使用'%s'

作者: jiuzhoulh   发布时间: 2011-12-02

student_score是整形的

作者: suren321   发布时间: 2011-12-02

引用 2 楼 suren321 的回复:

student_score是整形的

改为
strsql.Format(_T("update student set student_name='ee33388' where student_score = %d"), m_Value);

作者: gameslq   发布时间: 2011-12-02

还是不行啊 我用AfxMessageBox(strsql);后 显示update student set student_name='ee33388' where student_score = 15888445555

作者: suren321   发布时间: 2011-12-02

热门下载

更多