TOracleEvent and shared sessions

jpickup

Member²
I can't seem to use TOracleEvent with sessions that have been shared using the ExternalSVC property. They do however work with sessions shared with the Share method.

Other DOA components (TOracleQuery & TOracleDataset) work fine with the ExternalSVC approach.

Example:
Drop two TOracleSession components and a TOracleEvent on a form.
Link the event component to the second session component.

The following fails with an ORA-12560:
OracleSession2.ExternalSVC := OracleSession1.ExternalSVC;
OracleEvent1.Start;

But this works OK:
OracleSession1.Share(OracleSession2);
OracleEvent1.Start;

I imagine that TOracleEvent has a thread with its own session and for some reason there is not enough info in the ExternalSVC shared session to support the thread's session...

Any ideas/fixes?

One other thing that might be of interest: in my real app I don't get an ORA-12560 but rather an ORA-01004. The real app consists of in-process COM servers.

[This message has been edited by jpickup (edited 14 August 2002).]
 
My guess is that you need to set the LogonUsername, LogonPassword and LogonDatabase properties of the session for which you set the ExternalSVC property. The TOracleEvent needs to create a secondary session, and therefore needs this logon information.

------------------
Marco Kalter
Allround Automations
 
Thanks - that works.

Presumably this is what the share method does internally.

[This message has been edited by jpickup (edited 15 August 2002).]
 
Back
Top