Adorst没有创建,在Adorst前加入
HRESULT hr=Adorst.CreateInstance(__uuidof(_Recordset));
if(FAILED(hr))
{
MessageBox(NULL,"Created Recordset Failed","XX",MB_OK);
return S_FALSE;
}
HRESULT hr=Adorst.CreateInstance(__uuidof(_Recordset));
if(FAILED(hr))
{
MessageBox(NULL,"Created Recordset Failed","XX",MB_OK);
return S_FALSE;
}
_RecordsetPtr Adorst(AdoCon);
_ConnectionPtr AdoCon;
你试一下
Adorst.CreateInstance("ADODB.Recordset")
去掉 Adorst->Close();