Menu

#1212 Selected catalog is not the catalog what is shown in combobox after reconnect of a broken connection

SQuirreL
closed-fixed
nobody
None
5
2015-09-06
2015-08-14
Flo
No

When I have to reconnect to a broken database connection (Control + Alt + T) which supports catalogs, in the catalog combo box is still the last selected catalog shown - b u t it is loaded the default catalog.

I think it is because this piece of code in SQLConnectionState.java

try
{
_catalog = conn.getCatalog();
}
catch (SQLException ex)
{
/*

         * i18n [SQLConnectionState.errorSavingCatalog]
            "Error saving current catalog.\n" +
            "This might happen when reconnecting a Session to restore a broken connection.\n" +
            "The new connection will use the default catalog.";
         */
        String msg = s_stringMgr.getString("SQLConnectionState.errorSavingCatalog");

        s_log.error(msg, ex);
        if (msgHandler == null)
        {
            throw ex;
        }
        msgHandler.showErrorMessage(msg);
    }

Sure if the connection is broken java.sql.Connection#getCatalog() won't work. Perhaps it is possible to set in the catch block the catalog to the selected value in the catalog ComboBox

Discussion

  • Gerd Wagner

    Gerd Wagner - 2015-09-06
    • status: open --> closed-fixed
     
  • Gerd Wagner

    Gerd Wagner - 2015-09-06

    Is fixed in our Git repository. Will be available in future snapshots and versions.

     

Log in to post a comment.