|
-
Jul 8th, 2005, 06:48 AM
#1
Thread Starter
New Member
Help required in RDO
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
Last edited by Hack; Jul 8th, 2005 at 06:54 AM.
-
Jul 8th, 2005, 06:57 AM
#2
Re: Help required in RDO
Welcome to the Forums.
It has been several years since I've used RDO, so I'm kinda shootin' in the dark here, but a couple of questions and one observation.
I see no place in the code you posted where the connection is actually closed.
Why are you doing a connection .Add at the end of the code routine?
Have you tried closing the connection object and then setting the connection object to Nothing?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|