i have this simple scenario for test in a Oracle 11gR2 database :
A form with a button to set connection with the database:
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.DbOpenDatabase("db", "uid/pwd", ORADB_ENLIST_FOR_CALLBACK)
OraDatabase.MonitorForFailover Failover_Client, OraDatabase
MsgBox "Connected to " & OraDatabase.Connect & "@" & OraDatabase.DatabaseName & vbCrLf & "OO4O Version: " & OraSession.OipVersionNumber & vbCrLf & "Oracle Version: " & OraDatabase.RDBMSVersion
If i look on the database i see the exe running with the following script:
select Count(MACHINE) AS NumProcessi, MACHINE, PROGRAM from gv$session WHERE SCHEMANAME = 'MM2000' GROUP BY "USERNAME", "MACHINE","TERMINAL","PROGRAM" ORDER BY NUMPROCESSI DESC, TERMINAL;
this i what i see (just my process):
If then i close the connection:
Do Until OraDatabase.Parameters.Count = 0
Set OraDatabase = Nothing
Set OraSession = Nothing
if i look in the database i still see my process:
The row disappears only if i close the application (exe)
Why if i close the connection it does not close?
I have seen discussions about this but not real solution given...
The real scenario is that i have more snapins in a framework and the connection of each snapin do not close until the framwork is closed even if the snapins try to close their connections
What can i do ?