Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 207362 - "Execute Command" function from the database context menu connects to the wrong database
"Execute Command" function from the database context menu connects to the wro...
Status: NEW
Product: db
Classification: Unclassified
Component: Code
: P4 (vote)
Assigned To: Libor Fischmeistr
Depends on:
  Show dependency treegraph
Reported: 2012-01-16 20:59 UTC by athompson
Modified: 2014-01-13 09:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2012-01-16 20:59:07 UTC
Initial conditions: a DBMS instance with multiple databases (I'm using SQL server).  I'll call the databases "db1" and "db2".

1. In Netbeans, add a DB connection for the DBMS.  Specifify "db1" as the database to connect to.

2. Connect to the DBMS through netbeans.

3. Open the node for the DBMS, then navigate to db2-->dbo-->Tables.

4! Right-click on Tables and select "Execute Command..." from the context menu.  The SQL CC shows completions for db1 instead of db2 as expected, and the active DB when running the query is set to db1.

To summarize, if the user picks a node under db2 and opens an SQL query window, she expects the active DB to be db2, even if the connection was created using db1 as the default.  Due to this and also issue #200368, there's no way to get CC for db2 without explicitly creating a connection for it.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo