?
Solved

Switch off connection pooling in adodb

Posted on 2011-04-20
3
Medium Priority
?
509 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
0
Comment
Question by:RIAS
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
hes earned 2000 total points
ID: 35432913
0
 

Author Comment

by:RIAS
ID: 35433058
I have tried it.Any other way to disable connection pooling other than connction string
0
 
LVL 20

Expert Comment

by:hes
ID: 35434189
Yes editing the the registry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question