Article ID: 313220 - Last Review: June 5, 2002 - Revision: 1.0 PRB: Unexpected Connections to SQL Server with JDBCThis article was previously published under Q313220 On This PageSYMPTOMS
When you use multiple JDBC statements on a single connection, you may see multiple connections implicitly created by the Microsoft SQL Server 2000 Driver for JDBC.
CAUSE
If you open your database connection with the SelectMethod property set to Direct (the default setting), only one statement at a time can be active on the connection. When you create a second statement, the driver implicitly opens a new connection to handle the new result set.
RESOLUTION
The following two methods prevent implicit connections:
STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce the BehaviorThe following code demonstrates a scenario where the driver creates an implicit connection:REFERENCES
For complete details on the SelectMethod property, see the documentation for the Microsoft SQL Server 2000 Driver for JDBC.
| Article Translations
|

Back to the top
