Can you explain how to enable and disable connection pooling?

Ask a question
          

Interview questions

Enable and disable connection pooling in ADO.NET


Next question>>
Enable and disable connection pooling in ADO.NET - March 31, 2009 at 17:30 PM by Amit Satpute

Can you explain how to enable and disable connection pooling?

Set Pooling=true. However, it is enabled by default in .NET.

To disable connection pooling set Pooling=false in connection string if it is an ADO.NET Connection. 

If it is an OLEDBConnection object set OLEDB Services=-4 in the connection string. 

Enable and disable connection pooling in ADO.NET - June 06, 2009 at 10:30 AM by Shuchi Gauri

Can you explain how to enable and disable connection pooling?

To enable connection pooling:

SqlConnection myConnection = new SqlConnection(@"Data Source=(local)\SQLEXPRESS;Initial Catalog=TEST;Integrated Security=SSPI;");
This has connection pooling on by default

To disable connection pooling:
SqlConnection myConnection = new SqlConnection(@"Data Source=(local)\SQLEXPRESS;Initial Catalog=TEST;Integrated Security=SSPI;Pooling=false;");

Next question>>



Write your comment - Share Knowledge and Experience


Also read     

Explain the namespaces in which .NET has the data functionality class.

System.data contains basic objects. These objects are used for accessing and storing relational data........

Command objects uses, purposes and their methods.

The command objects are used to connect to the Datareader or dataset objects with the help of the following methods.........

What is the use of CommandBuilder?

CommandBuilder builds “Parameter” objects automatically.........

What’s difference between “Optimistic” and “Pessimistic” locking?

In pessimistic locking, when a user opens a data to update it, a lock is granted......

 
Latest placement tests
Latest links
 
 
Home | Login | About us | Sitemap | Contact us