CString strQuery="delete from UserList where UserName='hhh'";
try
{
HRESULT hr=m_pConnetion->Execute(_bstr_t(strQuery),NULL,adOptionUnspecified);
}
catch(_com_error ex)
{
AfxMessageBox(ex.Description());
return FALSE;
}怎么使用上面代码,出现异常:找不到存储过程 ‘hhh’
try
{
HRESULT hr=m_pConnetion->Execute(_bstr_t(strQuery),NULL,adOptionUnspecified);
}
catch(_com_error ex)
{
AfxMessageBox(ex.Description());
return FALSE;
}怎么使用上面代码,出现异常:找不到存储过程 ‘hhh’
_ConnectionPtr pConn(__uuidof(Connection));
_RecordsetPtr pRst(__uuidof(Recordset));
pConn->ConnectionString="Driver={MySQL ODBC 5.1 driver};data source=trm_base";
try
{
HRESULT hr = pConn->Open("","","",adConnectUnspecified);
CString strQuery ="delete from book_user where 预订人='hhh'";
hr=pConn->Execute(_bstr_t(strQuery),NULL,adOptionUnspecified);
}
catch (_com_error& err)
{
}
LZ,你跟一下了,看连接是否成功,是否初始化Ole,一直跟下去。~