I'm creating an MS Access application that connects to a SQL Server
2005 database using pass-through queries and ADO to call stored
procedures. I ran a SQL trace and started clicking through various
forms to look at how things were being handled on the database. I
noticed an alarming number of connections were opened as if there was
absolutely no connection pooling. After several clicks I had 20 new
connections. It appeared that a new connection was being opened by
each pass-through query even though the connection strings are exactly
the same in each (I set them globally in code at application
startup). I also noticed that if I set my connection string to use a
SQL Server login (username/password) rather than a trusted connection,
the problem went away and connections were properly reused. Note that
calls to the database made via ADO did not exhibit this problem.
Also, I'm not using an ODBC DSN.
Is there a reason why I'm seeing this behavior? Is there a setting
somewhere that I've neglected to change?
Bill E.
Hollywood, FL
2005 database using pass-through queries and ADO to call stored
procedures. I ran a SQL trace and started clicking through various
forms to look at how things were being handled on the database. I
noticed an alarming number of connections were opened as if there was
absolutely no connection pooling. After several clicks I had 20 new
connections. It appeared that a new connection was being opened by
each pass-through query even though the connection strings are exactly
the same in each (I set them globally in code at application
startup). I also noticed that if I set my connection string to use a
SQL Server login (username/password) rather than a trusted connection,
the problem went away and connections were properly reused. Note that
calls to the database made via ADO did not exhibit this problem.
Also, I'm not using an ODBC DSN.
Is there a reason why I'm seeing this behavior? Is there a setting
somewhere that I've neglected to change?
Bill E.
Hollywood, FL
Comment