注册 登录
编程论坛 VC++/MFC

求大神讲解MFC中操作VFP数据库时operator/operand type mismatch 出现错误的地方通常在哪儿呀?

JustLawyer 发布于 2013-01-12 16:08, 588 次点击
用MFC编写学生成绩管理系统,用了VFP数据库~
在登录点击确定时需用数据库的用户表,我已经创建了,但是在调用sql语句就出现了那个operator/operand type mismatch的错误~
strSQL.Format("select * from USERS where USER_ID='%s' AND USER_PASS='%s' AND USER_TYPE='%d'",
        m_name,m_password,type);
    recordset->Open(AFX_DB_USE_DEFAULT_TYPE,strSQL);
1 回复
#2
yuccn2013-01-13 10:29
operator/operand type mismatch 是抛异常?
是不是你的sql语法写错了
1