我在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的指针有问题,但却不知道为什么,请指教。谢谢!!!
theApp.m_pRecordset.CreateInstance("ADODB.Recordset");//执行到这一句时产生错误:
theApp.m_pRecordset->Open("SELECT * FROM users",_variant_t((IDispatch*)theApp.m_pConnection...编译通过
而theApp.m_pConnection却没有问题。
我想是在CTestView中使用CTestApp的指针有问题,但却不知道为什么,请指教。谢谢!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货