Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection Pooling in .NET/SQL Server?

Is it necessary or advantageous to write custom connection pooling code when developing applications in .NET with an SQL Server database? I know that ADO.NET gives you the option to enable/disable connection pooling -- does that mean that it's built into the framework and I don't need to worry about it? Why do people talk about writing their own connection pooling software and how is this different than what's built into ADO.NET?

like image 911
pix0r Avatar asked Aug 11 '08 21:08

pix0r


2 Answers

The connection pooling built-in to ADO.Net is robust and mature. I would recommend against attempting to write your own version.

like image 59
Sean Carpenter Avatar answered Oct 04 '22 16:10

Sean Carpenter


I'm no real expert on this matter, but I know ADO.NET has its own connection pooling system, and as long as I've been using it it's been faultless.

My reaction would be that there's no point in reinventing the wheel... Just make sure you close your connections when you're finished with them and everything will be fine!

I hope someone else can give you some more firm anwers!

like image 29
Chris Roberts Avatar answered Oct 04 '22 17:10

Chris Roberts