Hi all,
I have a big problem that I hope get help from you. I have a
_RecordsetPtr
variable called
pRstEmployDB
. In my code I have a line to open the Recordset
pRstEmployDB->Open("SOCIETE", _variant_t((IDispatch *) theApp.pConEmployDB, true), adOpenStatic, adLockReadOnly, adCmdTable);
the probleme is when this fucntion crashes (Acces Violation) it shows a messageBox to say that an error happened and crashes. How could i Catch the error so the program will no longer crashes and be closed?
I tried to use ASSERT(... ==S_OK) but crashes too.
I tried this way too, but no hope
Try
{
pRstEmployDB->Open("SOCIETE", _variant_t((IDispatch *) theApp.pConEmployDB, true), adOpenStatic, adLockReadOnly, adCmdTable);
}
catch (CException* e)
{
return FALSE;
}