各位侠士:
   我的问题是这样的:
   开发语言:VC 6.0
   目的:在表单视CForm1,CForm2中分别有一个Combox控件,将其绑定在数据库中一个表Test中的字段“test“。
   部份实现代码:
  BOOL CTextApp::ADOExecute(_RecordsetPtr &ADOSet, _variant_t &strSQL)
  {
  if(adStateOpen==ADOSet->State)
  ADOSet->Close();
  
  try
  {
     ADOSet->Open(strSQL,m_pConnection.GetInterfacePtr(),adOpenStatic,adLockOptimistic,adCmdUnknown);
  return TRUE;
  }
  catch(_com_error &e)
  {
    CString err;
err.Format("错误提示:无效的数据操作\n出错提示:%s",(char *)e.Description());
AfxMessageBox(err);
return FALSE;
  }
}//实现记录的操作
BOOL CFrom1::InitCombo()
{
       _variant_t holder;
       _variant_t   str;
      
str="select * from Pr_A01";
int  iCount=0;
iCount=theApp.m_pADOSet->GetRecordCount();
        theApp.m_pADOSet->MoveFirst(); CString  name;
for(int i=0;i<iCount;i++)
{
  holder=theApp.m_pADOSet->GetCollect("a0101");
  name=holder.vt==NULL?"":(char*)(_bstr_t)holder;
  m_Combo.AddString(name);
  theApp.m_pADOSet->MoveNext();
}
m_Combo.SetCurSel(0);
   
}//实现对Combox的初始化。CForm2代码与这一样然后,我在CForm1::OnInitialUpdate()和CForm2::OnInitialUpdate()中添加OnInitCombo().     问题:编译后正常。但是,当先打开CForm1或CForm2时,另一个不能打开,否则将会报错,点击报错确定后,强制退出程序。(注:该错误并非我所捕获的错误)     请问各位侠士,这是什么原因?我该如何解决?先谢谢了。