Connection pooling allows you to reuse connections rather than creating a new one every time the driver needs to establish a connection to the underlying database. Your Progress DataDirect for ODBC driver enables connection pooling without requiring changes to your client application.

Refer to DataDirect Connection Pooling in the Progress DataDirect for ODBC Drivers Reference for more information.

To configure the driver to use connection pooling:

  • Set the Connection Pooling (Pooling) option to 1.
  • Set the Connection Reset (ConnectionReset) option to 1 or 0. Setting it to 1 resets the state of connections removed from the connection pool for reuse by an application to the initial configuration of the connection. Setting it to 0 does not reset the state of connections.
  • Set the Load Balance Timeout (LoadBalanceTimeout) option to specify an integer value to specify the amount of time, in seconds, to keep connections open in a connection pool.
  • Set the Max Pool Size (MaxPoolSize) option to specify an integer value to specify the maximum number of connections within a single pool.
  • Set the Min Pool Size (MinPoolSize) option to an integer value to specify the minimum number of connections that are opened and placed in a connection pool when it is created.
  • Set the Host Name (HostName) option to specify the name or the IP address of the server to which you want to connect.
  • Set the Port Number (PortNumber) option to specify the port number of the server listener. The default is 5432.
  • Set the Database Name (Database) option to specify the name of the database to which you want to connect.
  • Set the User Name (LogonID) option to specify your user name.
  • Set the Password option to specify your password.

The following examples show how to configure the driver to use connection pooling:

Connection string

DRIVER=DataDirect 8.0 PostgreSQL Wire Protocol;Pooling=1;ConnectionReset=0;
LoadBalanceTimeout=0;MaxPoolSize=100;MinPoolSize=0;HostName=myserver;
PortNumber=5432;Database=Payroll;LogonID=John;Password=secret;

odbc.ini

[PostgreSQL]
Driver=ODBCHOME/lib/xxpsql28.yy
...
Pooling=1
...
ConnectionReset=0
...
LoadBalanceTimeout=0
...
MaxPoolSize=100
...
MinPoolSize=0
...
HostName=myserver;
...
PortNumber=5432;
...
Database=Payroll;
...
LogonID=John;
...
Password=secret;
...
Note: The LogonID and Password options are not required to be stored in the data source. They can also be sent separately by the application using the SQLConnect ODBC API. For SQLDriverConnect and SQLBrowseConnect, they will need to be specified in the data source or connection string.