Exceptions wirth CDaoRecordset 
Author Message
 Exceptions wirth CDaoRecordset

Hi,

I'm writting a COM object in VC++. The client application detects an
exception in the COM object, and I think it is in the following code:

 CInboxSet rs(&m_Datanase);
 try
 {
  rs.Open(dbOpenDynaset, _T("TABLE1"));

 }
 catch (CDaoException* e)
 {
  AfxMessageBox(e->m_pErrorInfo->m_strDescription);
  e->Delete();
  return S_FALSE;
 }

If there is a problem opening TABLE1, a message box should appear. Instead,
the COM object ends.

Does someone know why?

Thanks,

Andre



Sun, 02 Mar 2003 23:29:39 GMT  
 Exceptions wirth CDaoRecordset
try catching CException before CDaoException

j


Quote:
> Hi,

> I'm writting a COM object in VC++. The client application detects an
> exception in the COM object, and I think it is in the following code:

>  CInboxSet rs(&m_Datanase);
>  try
>  {
>   rs.Open(dbOpenDynaset, _T("TABLE1"));

>  }
>  catch (CDaoException* e)
>  {
>   AfxMessageBox(e->m_pErrorInfo->m_strDescription);
>   e->Delete();
>   return S_FALSE;
>  }

> If there is a problem opening TABLE1, a message box should appear.
Instead,
> the COM object ends.

> Does someone know why?

> Thanks,

> Andre



Tue, 04 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CDaoRecordSet -- CDaoRecordSet -- CDaoRecordSet

2. CDaoRecordset.Open Exception Error

3. CDaoRecordset causing exceptions

4. Unhandled exception using Cdaorecordset

5. Unhandled exception in CDaoRecordset

6. CDaoRecordset.Open Exception Error

7. CDaoRecordset causing exceptions

8. Is PASCAL wirth learning?

9. Translate a SEH exception into a C++ exception

10. Soap Exception -- Inner Exception

11. Exception gurus - Copy constructors of exceptions

12. Exception with no Exception

 

 
Powered by phpBB® Forum Software