Oracle Logon Exception

MYA

Member
Hi,

I disabled the Oracle DB service and tried to connect via oraclesession.

Delphi 2007, Oracle 10g, DOA411

try
OracleSession1.LogOn;
except
on E: EOracleError do;
end;

but i could not handle the exception. I develop a service app and these code calls from the oncreate event. But i encountered a popup message called "orac-1254" and my service could not be started because of the exception.

how can i figure it out?

thanks

 
Is the message exactly "orac-1254"? Because that is an unknown message to me.

In any case, the TOracleSession.LogOn procedure will not display any messages. All errors will be propagated as exceptions to the application, which can handle them appropriately.
 
ora-1254: TNS:could not resolve the connect identifier specified

if oracle is not available, the TOracleSession.LogOn procedure throws an exception called "ora-1254" i could not prevent/catch it.. (i could not show my message)

thanks
 
Last edited:
That error is propagated by the TOracleSession component as an EOracleError exception to the application.
 
so we cannot prevent it right?

i need a function as to whether oracle is available/up or not

how can i understand it with TOracleSession?

thanks
 
Last edited:
Back
Top