Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> OO4O and connections

OO4O and connections

From: Andreas <comrules_at_hotmail.removestuff.com>
Date: Tue, 7 Sep 1999 09:40:31 +0200
Message-ID: <7r2f8g$o6d$1@oslo-nntp.eunet.no>


Hi! I have a problem with connections that won't disconnect. I'm using OO4O version 2.2.xx from VB6.

The problem is that when i'm calling a stored procedure in the oracle server there seem to be some references left to objects that causes the connection to not disconnect. When I quit my program and releases the oracle dll all the connections are released.

If I dont call the stored procedure but instead accesses my tables directly there's no problem with connecting and disconnecting.

There also seems to some huge memory leaks in the oracle dll. Is this a known problem?

The current fix is to use the same connection and database object over time but I really dont like this solution since there seem to be even worse memory leakage then.

Using another interface (like ADO) is not an option.

Thanks
ANdreas




Sample code:

Private Sub Import()
  Dim oraSession As OracleInProcServer.oraSession   Dim oraDatabase As OracleInProcServer.oraDatabase   Dim oraSqlStatement As OracleInProcServer.OraSqlStmt

  Dim scriptDynaset As OracleInProcServer.oraDynaset

  Set oraSession = CreateObject("OracleInProcServer.XOraSession")

  Set oraDatabase = oraSession.OpenDatabase(server_, loginId_ & "/" & passwd_, 0&)

' Add parameters

  oraDatabase.Parameters.Add "C_Script", 0, ORAPARM_BOTH

' Call stored procedure

  Set oraSqlStatement = oraDatabase.CreateSql("Begin P_CONFIG.PS_Config(:C_Script);end;", ORASQL_FAILEXEC)

' Copy returned recordset

  Set scriptDynaset = oraDatabase.Parameters("C_Script").value

   ' Remove parameter info
  oraDatabase.Parameters.Remove ("C_Script")

' If I replace the code above with the following database call everyting
works fine
' Set scriptDynaset = oraDatabase.DbCreateDynaset("select * from
script", 0&)

' Reset everything (which should cause the connection to go down)
  Set scriptDynaset = Nothing

  Set oraSqlStatement = Nothing

  Set oraDatabase = Nothing

  Set oraSession = Nothing

End Sub Received on Tue Sep 07 1999 - 02:40:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US