This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207362 - "Execute Command" function from the database context menu connects to the wrong database
Summary: "Execute Command" function from the database context menu connects to the wro...
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P4 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 20:59 UTC by athompson
Modified: 2014-01-13 09:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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.