vc6。0 ADO连接数据库问题
CString a;
a.Format("update CardInfo set Sel=Sel+'%s' where CardId='%s'",m_Count,m_CardId);
try
{
m_Rst->Open(_variant_t(a),
conn.GetInterfacePtr(),
adOpenDynamic,
adLockOptimistic,
adCmdText);
}
catch(_com_error *es)
{
AfxMessageBox(es->ErrorMessage());
}
其中的SQL语句要实现的功能是:
输入m_CardId、m_Count后,在表CardInfo中让Sel加上m_Count,但是表中没有Count的字段。Sel在表中的数据类型为char,m_Count在程序中的类型为CString。 在运行的时候报错。。。请问该怎样写这个语句。