ineedhelplease
Technical User
I am able to open a new Oracle ODBC connection using:
Dim sConn As String, sSQL As String, sServer As String
Dim cnn As ADODB.Connection
'make oracle connection
Set cnn = New ADODB.Connection
sServer = "SSSSSSS"
cnn.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=" & sServer & ";" & _
"Uid= UUUUUUU;" & _
"Pwd= PPPPPPP"
'check if connection is made
If cnn.State = adStateOpen Then
MsgBox "Connection made!"
Else
MsgBox "Connection failed."
End If
'more code below this.
---------------------------
What I need is to be able to do is now get a list of all open Oracle ODBC connections so that:
1. I can check if one is established before letting another function use the connection
2. Close a connection using a sub/function different than the one that opened the connection.
Using connection strings are new for me, so I would appreciate any help.
Thank you.
Dim sConn As String, sSQL As String, sServer As String
Dim cnn As ADODB.Connection
'make oracle connection
Set cnn = New ADODB.Connection
sServer = "SSSSSSS"
cnn.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=" & sServer & ";" & _
"Uid= UUUUUUU;" & _
"Pwd= PPPPPPP"
'check if connection is made
If cnn.State = adStateOpen Then
MsgBox "Connection made!"
Else
MsgBox "Connection failed."
End If
'more code below this.
---------------------------
What I need is to be able to do is now get a list of all open Oracle ODBC connections so that:
1. I can check if one is established before letting another function use the connection
2. Close a connection using a sub/function different than the one that opened the connection.
Using connection strings are new for me, so I would appreciate any help.
Thank you.