public synchronized void renameFile(JDBCSequentialFile file,String newFileName) throws SQLException {
  try {
    connection.setAutoCommit(false);
    renameFile.setString(1,newFileName);
    renameFile.setInt(2,file.getId());
    renameFile.executeUpdate();
    connection.commit();
  }
 catch (  SQLException e) {
    connection.rollback();
    throw e;
  }
}

public synchronized void renameFile ( JDBCSequentialFile file , String newFileName ) throws SQLException { try { connection . setAutoCommit ( false ) ; renameFile . setString ( 1 , newFileName ) ; renameFile . setInt ( 2 , file . getId ( ) ) ; renameFile . executeUpdate ( ) ; connection . commit ( ) ; } catch ( SQLException e ) { connection . rollback ( ) ; throw e ; } }
updates the filename field to the new value .
