Whenever you call getConnection() manually, you must close this connection.
If you have any sugestions to improve the documentation, patches are
welcome (preferably via jira).
Thomas
"Trevor Miller" <[EMAIL PROTECTED]> schrieb am 29.05.2006 09:59:06:
> Hi All,
>
> I'm using native JDBC to perform a slect count in conjunction with
torque.
>
> Connection con = Torque.getConnection();
> String sql = "SELECT COUNT(menu_id) FROM menu WHERE
parent_id=?";
> PreparedStatement pStmt = con.prepareStatement(sql);
> pStmt.setInt(1,menuId);
> ResultSet rs = pStmt.executeQuery();
> if (rs != null && rs.next())
> {
> result = rs.getInt(1);
> }
> rs.close();
> pStmt.close();
>
> Should I call close on the connection object or not. This feature is
> not well documented.
>
> Trevor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]