VC++ Acess

来源:百度知道 编辑:UC知道 时间:2024/05/22 16:34:39
我想用SQl删除一条记录,但是总要报错
m_pCommand.CreateInstance(__uuidof(Command));
m_pCommand->ActiveConnection = m_pConnection; // 将库连接赋于它
m_pCommand->CommandText = "DELETE * FROM data where 身份代码 =A001"; // SQL语句
m_pRecordset = m_pCommand->Execute(NULL, NULL,adCmdText);

DELETE FROM data where 身份代码 =A001
sql语句错了。。。。不要*

sprintf(szSql,"delete * from MerchandiseType where MT_Name_S ='%s';",str);
g_pConnection->Execute((_bstr_t)szSql,vt1,adCmdText);