ADO.NET Connectionstring+pooling

N

njdude

When i run this

sp_who

I see the connection showing up and in the next second it is gone.


The connectionstring i have is

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;pooling=true;Min Pool Size=2;Max Pool Size=50;Connection
Lifetime=120;Initial Catalog=test;Data Source=TESTMACHINE\SQLEXPRESS;


And then in the log, the log grows almost every second 3 entiries !!
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."


So the problem is that pooling does not seem to work. I dont see any
connections being held for more than 1 second
 
W

William \(Bill\) Vaughn

IIRC you can't affect the operation of the Connection pool with the OLE DB
provider (as you are attempting). One of the issues of the OLE DB provider
connection string is that any key you use that's not recognized is ignored.

First, if you want to access SQL Server with ADO.NET (and this IS an ADO.NET
newsgroup), you should use the SqlClient namespace not OleDb. In this case
your Connection string does not include the Provider key.

See Chapter 9 for more information.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top