在执行m_pRecordset->Open(bstrSQL,
//_variant_t((IDispatch *)m_pConnection,true),
m_pConnection.GetInterfacePtr(),
adOpenStatic,
adLockOptimistic,
adCmdText);
应用程序,提示内存出错。
跟踪后的结果是:
Unhandled exception in HnRadio.exe (MSVCRT.DLL):0xc00000fd :stack overflow请问各位大虾,是怎么回事??
//_variant_t((IDispatch *)m_pConnection,true),
m_pConnection.GetInterfacePtr(),
adOpenStatic,
adLockOptimistic,
adCmdText);
应用程序,提示内存出错。
跟踪后的结果是:
Unhandled exception in HnRadio.exe (MSVCRT.DLL):0xc00000fd :stack overflow请问各位大虾,是怎么回事??
try {
m_pRecordset->Open(bstrSQL,
//_variant_t((IDispatch *)m_pConnection,true),
m_pConnection.GetInterfacePtr(),
adOpenStatic,
adLockOptimistic,
adCmdText);
} catch (_com_error err) {
AfxMessageBox((LPCTSTR)err.Description());
}
可能会是你的代码问题,也可能会是你对数据库接口的工作过程步了解,导致了数据库接口BUG的爆发
如:
原先:int a[1000];
改为:
int *a=new int[1000];注意用后删掉,释放存储
那你现在操作放在哪里?如果是放在线程里,线程开始处要初始化com库:CoInitialize();