Groups | Blog | Home
all groups > sql server odbc > september 2003 >

sql server odbc : slow connection


Wayne Hui
9/4/2003 2:18:50 PM
I was testing my C app that uses ODBC to connect to SQL
Server and noticed if I kept the connection open until all
queries are finished, it is 2-3 times faster.

I thought SQL Server has connection pooling that
disconnecting and connecting should not be a problem. Does
connection pooling not work with ODBC? My colleague tested
with a .NET app and it did not have that problem.

Any insight is appreciated.

-Wayne Hui
Shaung Liu
9/4/2003 5:23:27 PM
ODBC does not maintain connection pooling. ASP/ASPX has it's own
connection pooling and so does OLEDB. .NET will use ADO.NET, which I
believe uses the OLEDB driver for connection pooling.


*** Sent via Developersdex http://www.developersdex.com ***
Sue Hoegemeier
9/4/2003 6:26:17 PM
You have to enable ODBC connection pooling (vs. with OLE DB
session pooling it's on by default). Some of it also has to
do with coding techniques.
You can find more info on connection pooling in this article
and the links it has to more information:
INFO: Frequently Asked Questions About ODBC Connection
Pooling
http://support.microsoft.com/?id=169470

-Sue

On Thu, 4 Sep 2003 14:18:50 -0700, "Wayne Hui"
[quoted text, click to view]
AddThis Social Bookmark Button