这个语句哪里错了啊
z_kai 2005-06-07 01:58:27 try
{
m_pRecordset->Open("SELECT * FROM DemoTable", // 查询DemoTable表中所有字段
theApp.m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针
adOpenDynamic,
adLockOptimistic,
adCmdText);
}
catch(_com_error *e)
{
AfxMessageBox(e->ErrorMessage());
}
编辑时提示三个错误
error C2065: 'theApp' : undeclared identifier
error C2228: left of '.m_pConnection' must have class/struct/union type
error C2228: left of '.GetInterfacePtr' must have class/struct/union type
Error executing cl.exe.
ADO连接数据库CodeDlg.obj - 3 error(s), 0 warning(s)
我是初学者,请各位加我QQ,向你们学习啊!
QQ:38078432
MAIL:z_kai@126.com