还是有问题..........救命!!!
DOA 2002-07-28 08:51:26 我在CTestApp中定义了_RecordsetPtr m_pRecordset;
我想在CTestView的OnInitialUpdate()中使用它来从数据库中读取数据:
extern CTestApp theApp;
theApp.m_pRecordset.CreateInstance("ADODB.Recordset");
//执行到这一句时产生错误:
theApp.m_pRecordset->Open("SELECT * FROM users",_variant_t((IDispatch*)theApp.m_pConnection...
编译通过
而theApp.m_pConnection却没有问题。
我想是在CTestView中使用CTestApp的指针有问题,但却不知道为什么,请指教。
谢谢!!!