File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes DB2 Pool Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DB2 Pool Data" Watch "DB2 Pool Data" New topic
Author

DB2 Pool Data

Vikram Anand
Greenhorn

Joined: May 17, 2002
Posts: 10
I want to use the pool data in Db2
Oracle gives the code as simple as
/*
* A simple Pooled Connection Sample
*/
import java.sql.*;
import javax.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.pool.*;
class PooledConnection1
{
public static void main (String args [])
throws SQLException
{
// Create a OracleConnectionPoolDataSource instance
OracleConnectionPoolDataSource ocpds =
new OracleConnectionPoolDataSource();
// Set connection parameters
ocpds.setURL("jdbc racle ci8:@");
ocpds.setUser("scott");
ocpds.setPassword("tiger");
// Create a pooled connection
PooledConnection pc = ocpds.getPooledConnection();
// Get a Logical connection
Connection conn = pc.getConnection();
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
// Iterate through the result and print the employee names
while (rset.next ())
System.out.println (rset.getString (1));
// Close the RseultSet
rset.close();
rset = null;
// Close the Statement
stmt.close();
stmt = null;
// Close the logical connection
conn.close();
conn = null;
// Close the pooled connection
pc.close();
pc = null;
}
}

can any one help me for DB2.
thankyou
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DB2 Pool Data