Code example for Connection

Methods: getAutoCommit, setAutoCommit

0
     */ 
    public void setConnection (Connection conn) throws Exception {
        connect = conn;
        if (connect != null) {
            try { 
                commitstate = connect.getAutoCommit ();
                connect.setAutoCommit (true);
            } catch (SQLException e) {
                throw new Exception ("Unable to set auto commit on connection: " + e.toString ());
            } 
        } 
    } 
 
    /** return current connection 
     * @return current used connection 
     */ 
    public Connection getConnection () {
        return connect;
    } 
 
    /**