Switch off connection pooling in adodb

Hi,
How do I switch off connection pooling in adodb.My connection string is    SetConnectionString .
Pooling=false is not helping


 Private Shared Function SetConnectionString(ByRef InpUID As String, ByRef InpPWD As String, ByRef intDBName As String, ByRef intODBCDB As String, ByRef TrustedConnection As Boolean, ByRef SQLServerName As String, ByRef inpOracleOLEDB As Boolean, ByVal inpDatabasetype As DatabaseType, ByVal pooling As Boolean) As String

      SetConnectionString = Nothing
      If inpDatabasetype = DatabaseType.SQLServer Then
         If TrustedConnection Then
            SetConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=" & intODBCDB & ";Data Source=" & SQLServerName & ";Extended Properties = ""Trusted Connection=" & CInt(TrustedConnection) & """" & "; Pooling = " & pooling
         Else
            SetConnectionString = "Provider=SQLOLEDB.1;Password=" & InpPWD & ";User ID=" & InpUID & ";Initial Catalog=" & intODBCDB & ";Data Source=" & SQLServerName & "; Pooling = False"
         End If
      ElseIf inpDatabasetype = DatabaseType.Oracle Then
         If inpOracleOLEDB Then
            SetConnectionString = "Provider=OraOLEDB.Oracle.1;Password=" & InpPWD & ";User ID=" & InpUID & ";Data Source=" & intODBCDB & ";Persist Security Info=False" & "; Pooling = False"
         Else
            SetConnectionString = "Provider=MSDAORA.1;Password=" & InpPWD & ";User ID=" & InpUID & ";Data Source=" & intODBCDB & ";Persist Security Info=False" & "; Pooling = False"
         End If
      End If

   End Function


Cheers
RIASAsked:
Who is Participating?
 
RIASAuthor Commented:
I have tried it.Any other way to disable connection pooling other than connction string
0
 
hesCommented:
Yes editing the the registry
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.