开发者

Can I use connection pooling with SQLDatasource?

开发者 https://www.devze.com 2023-03-25 04:32 出处:网络
After reading documentation 开发者_StackOverflow中文版about Connection Pooling, I learned that ADO.NET uses Connection pooling by default. But the application that I am working with using SQLDatasourc

After reading documentation 开发者_StackOverflow中文版about Connection Pooling, I learned that ADO.NET uses Connection pooling by default. But the application that I am working with using SQLDatasource and I wonder if I can use Connection Pooling?

If yes, is there a quick tutorial around?


My guess would be that it uses System.Data.SqlClient in turn so that as long as you use the same connection string, pooling will work.

I think you can test it quite easily though. Just spawn up a bunch of these from code and attach the sql profiler and see if you get alot of calls to "sp_reset_connection" which gets called every time a connection is pulled from the pool.

0

精彩评论

暂无评论...
验证码 换一张
取 消