此项目为企业门户网站
源代码在线查看: proxool-test.jsp
Proxool-test.jsp
使用 Proxool Connection Pool
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try
{
con = DriverManager.getConnection("proxool.net");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
String query = "SELECT * FROM tb_usertable";
rs = stmt.executeQuery(query);
while(rs.next()) {
String name = rs.getString(2);
String password = rs.getString(3);
%>
姓名为:
密码为:
}
stmt.close();
con.close();
}
catch(SQLException sqle)
{
out.println("sqle="+sqle);
}
finally
{
try {
if(con != null)
{
con.close();
}
}
catch(SQLException sqle)
{
out.println("sqle="+sqle);
}
}
%>