Tomcat5+Mssql server 2000数据库连接池配置之旅
if (ds != null) { Connection conn = ds.getConnection();if(conn != null){
foo = "Got Connection "+conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst =
stmt.executeQuery("select * from orders");
if(rst.next()) {
foo=rst.getString("CustomerID");
bar=rst.getInt("OrderID");
}
conn.close();
}
}
}catch(Exception e) {
e.printStackTrace();
}
}
页:
[1]