private String createID() throws RemoteException
  {
    Statement stmt = null;
    ResultSet rs = null;
    try {
      String tableName = getTableName();
      String idField   = getIDField();
      if (this.upper)
      {
        tableName = tableName.toUpperCase();
        idField   = idField.toUpperCase();
      }
      
      stmt = getConnection().createStatement();
      rs = stmt.executeQuery("select (max(" + idField + ") + 1) from " + tableName);
      if (!rs.next())
        throw new SQLException("select max(id) returned empty resultset");
      return rs.getString(1);
    }
    catch (SQLException e)
    {
      throw new RemoteException("unable to create new insert id",e);
    }
    finally
    {
      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException se) {/*useless*/}
      }
      if (stmt != null) {
        try {
          stmt.close();
        } catch (SQLException se) {/*useless*/}
      }
    }
  }