Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a VB6 application which uses Oracle Objects for OLE’s batch insert logic. It can run for days, processing thirty or more files a day. But every so often, it fails on one of the ExecuteSQL statements.

The error is -2147417848: Automation error. The object invoked has disconnected from its clients.

I cannot recreate it by choice but, if I run hundreds of files through the application in the development region, it will eventually error out. I’ve checked the LastServerErr from the OraDatabase and from the OraSession and they are both zero.

I’ve tried closing the database connection and letting the code continue but then the next database access gets a new error:

Unable to make connection, ORA-12545: Connect failed because target host or object does not exist.

I don’t think it’s a data related problem because, when I stop and restart the application, the same file which failed, runs through perfectly. And I don’t think it’s a number of files or records issue because sometimes it takes days to fail and sometimes it will fail twice within two hours.

I’ve googled my little fingers off with no results. My next idea was to have this failing application, when it hits this error condition, start up another copy of the executable and then end the failing one. It should work but there’s got to be a better way, right?

Any help would be much appreciated.

Here’s the code used to make the Oracle connection:
Set poOraSession = CreateObject("OracleInProcServer.XOraSession")
Set poOraDatabase = poOraSession.OpenDatabase(strDSN, strUserID & "/" strPassword, 0&)
Posted

1 solution

This isn't an Oracle error.
I would suggest you look into this[^] or this[^] instead.
 
Share this answer
 
Comments
judy kamber 4-Mar-14 12:09pm    
I appreciate your suggestions but each of the solutions suggest that this problem would happen every time, not once every 4-5 days of execution. Thanks for your effort; it is much appreciated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900