I'm using a TOracleObject in a program. I have some problems when an error occurs. After an error, for example an ORA-06550, I want to destroy the oracle object, but the destructor raises an exception "EAccessViolation".
This is the code of the destructor (theOracleObject is a pointer to TOracleObject):
try {
if (NULL == theOracleObject) return;
if (!theOracleObject->IsNull())
delete theOracleObject;
}
catch( EOracleError& E )
{
Error=1;
}
catch( Exception& E )
{
Error=2;
}
catch( ... )
{
Error=3;
}
I check if the object is null before call the destructor (method 'isNull'), is this check needed?
The code of the object creation is:
theOracleObject = new TOracleObject(theSession, "O_MOV_LST_CANCEL", "");
where 'theSession' is a pointer to a TOracleSession.
How can I destroy the object?
The version of DOA I'm using is 4.0.7.1
This is the code of the destructor (theOracleObject is a pointer to TOracleObject):
try {
if (NULL == theOracleObject) return;
if (!theOracleObject->IsNull())
delete theOracleObject;
}
catch( EOracleError& E )
{
Error=1;
}
catch( Exception& E )
{
Error=2;
}
catch( ... )
{
Error=3;
}
I check if the object is null before call the destructor (method 'isNull'), is this check needed?
The code of the object creation is:
theOracleObject = new TOracleObject(theSession, "O_MOV_LST_CANCEL", "");
where 'theSession' is a pointer to a TOracleSession.
How can I destroy the object?
The version of DOA I'm using is 4.0.7.1