We help IT Professionals succeed at work.

Switch off connection pooling in adodb

RIAS
RIAS asked
on
565 Views
Last Modified: 2012-05-11
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
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I have tried it.Any other way to disable connection pooling other than connction string
hes
CERTIFIED EXPERT

Commented:
Yes editing the the registry
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.