Disabling Ole Db connection pooling

Dim cnNorthwind As New O1eDbConnection() cnNorthwind.ConnectionString = _ "Provider=SQLOLEDB;" & _ "Data Source=London;" & _ "Integrated Security=SSPI;" & _ "OLE DB Services=-4;" & _ "Initial Catalog=Northwi nd;")

*****************************ILLEGAL FOR NON-TRAINER USE******************************

Introduction When you connect to an OLE DB data source, connection pooling is automatic.

The OLE DB .NET Data Provider uses OLE DB session pooling by default.

You can control OLE DB connection pooling from your application by:

■ Disabling pooling in individual connection strings.

■ If you write directly to the OLE DB API, controlling pooling through the properties you set when connecting to the database.

To disable pooling in a connection string that uses the OLE DB .NET Data Provider, specify "OLE DB Services=-4" in your connection string.

0 0

Post a comment