Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2003
    Location
    Romania
    Posts
    10

    Exclamation Unanswered: Problem using PooledConnection - SQL Server 2000 Driver for JDBC Service Pack 2

    I want to create a pool connection for my application using this code:
    ...
    import com.microsoft.jdbcx.sqlserver.SQLServerDataSource;
    import javax.sql.PooledConnection;
    ....
    private SQLServerDataSource bds = null;
    private PooledConnection pc = null;


    bds = new SQLServerDataSource();

    bds.setServerName(serverName);
    bds.setPortNumber(portNumberInt);
    bds.setDatabaseName(databaseName);
    bds.setUser(userName);
    bds.setPassword(password);
    try
    {
    pc = bds.getPooledConnection();
    }
    catch (SQLException e)
    {
    e.printStackTrace();
    }

    java.sql.Connection con1 = pc.getConnection();

    java.sql.Connection con2 = pc.getConnection();

    The error is:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Pooled connection reclaimation not supported.
    at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
    at com.microsoft.jdbcx.base.BasePooledConnection.getC onnection(Unknown Source)

    Is generated by the second connection. Way I can't get more that one connection!? This is my goal: to creat a pool connections. But "PooledConnection" don't work as a connection pool.

    Thanks a lot!
    Last edited by Maf; 04-27-04 at 10:37.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •