Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EExternalExecption with message 'External exception C0000025'

Status
Not open for further replies.

chelsea11

Programmer
Mar 4, 2011
4
BG
hello

i use c++ borland 5.0. I have application which connects to remote db2 database. The network is removed during execution of statements by removing the network cable. The try block into application catch the exceptio and the application do not crash. But when i close the application i get the next exceptions:
1. EOLeException with message CLI01106E Connection is closed SQLSTATE=08003

2. class EExternalExecption with message 'External exception C0000025'

what can be the reason for this problems ?

please help
 
I'm guessing that something isn't closing correctly. Look carefully at the catch statements and see if you forgot to close a connection or something.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
it is not possible the connection to be closed correct because the cable is unpluged ... if i close connection on unpluged cable it will rise new exception
 
Just because the cable is unplugged that doesn't mean the connection is closed. Why would closing the connection raise an exception?

What could be happening is that when you close the program, you have an open connection or an "object" still open. You need to close and delete the connection/object. Without seeing the code, I can't really say what is happening.





James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
try{
ADO_DM->Target_Query->ExecSQL();
}
catch( Exception& t ) {

Event_Log_Obj.LogEvent("error: "+tgtnumber+"): "+t.Message +" Çàÿâêà: "+ stmnt );
ADO_DM->Source_Connection->RollbackTrans();
ADO_DM->Target_Connection->Cancel();
return;

}
catch (EOleException &t) {
Event_Log_Obj.LogEvent("error "+t.Message +" Çàÿâêà: "+ stmnt );
ADO_DM->Source_Connection->RollbackTrans();
ADO_DM->Target_Connection->Cancel();
return;
} catch(EADOError &f) {
Event_Log_Obj.LogEvent("error"+ stmnt);
ADO_DM->Source_Connection->RollbackTrans();
return;
} catch(Exception &e) {
Event_Log_Obj.LogEvent("error"+ stmnt);
ADO_DM->Source_Connection->RollbackTrans();
return;
} catch (...) {
Event_Log_Obj.LogEvent("error: "+ stmnt);
ADO_DM->Source_Connection->RollbackTrans();
return;
}

this it the statemts which i catch the exceptions
 
This will catch exceptions when you try to executed a query. It won't catch an exception if you are trying to close a form with an open connection. Try closing all connections on the form's ONCLOSE method and see what happens.

James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top