I have a VB6 application that connects to Oracle using connection pooling in OO4O 9. However, periodically, the code
If oraDatabase.ConnectionOK = False Then
Set oraDatabase = oraSession.GetDatabaseFromPool(1000)
falls over with the automation error - the object invoked has disconnected from its clients on the If statement. Stepping to the next line (to redefine the object) causes the same error. This implies that the oraSession has disconnected.
oraDatabase is an OracleDatabase class, oraSession is an OracleSession class.
The application can be requesting 10s of 1,000s of rows and doing a lot of processing on them before needing to talk to the database again, or it may be simply waiting for a user to decide what to do.
Why is this error occurring and how do I prevent it?
I'm no SQL*Net expert, but sometimes the server can be set to disconnect idle connections. You'll need to verify that is not set up that way. Also, be sure to check your database logs just to make sure that you are not getting ORA-600 errors that are killing the sessions...