Hi,
Can someone help me with this problem?
I am using RDO to connect to a remote Oracle server. The problem is that whenever I use EstablishConnection for establishing a connection to the database, an entry for this connection gets automatically inserted in the v$session table. But after the connection is closed by invoking the Close method of rdoConnection object that entry remains in the v$session table. It is not getting deleted. As a result when the maximum connection is reached we have to manually monitor the connections and kill them. Here is the code snippet used to establish connection. Can someone help me with this - how do I ensure that the entry for the connection gets deleted from v$session table when the connection is closed?
VB Code:
Public Cn As New rdoConnection Public mrdoEnv As rdoEnvironment With rdoEngine .rdoDefaultLoginTimeout = 20 .rdoDefaultCursorDriver = rdUseIfNeeded End With Set mrdoEnv = rdoEnvironments(0) mbEnvOpen = True With Cn .Connect = "DSN=ABC;UID=" & UserId & ";PWD=" & password & ";SRVR=" & Server If Not frmAsync Then .EstablishConnection rdDriverComplete, False Else .EstablishConnection rdDriverComplete, False, rdAsyncEnable While .StillConnecting j = j + 1 DoEvents Wend End If mrdoEnv.rdoConnections.Add Cn End With
Edit: Added [vbcode][/vbcode] tags for clairty. - Hack




Reply With Quote