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.
using Dev (Build 200904261401) 1) connect to the sample derby database 2) perform a select statement to one of the tables by right clicking the the table and selecting view data action will place a sql query in the sql editor without the semicolon at the end of the line. ex: select * from APP.MANUFACTURER 3) now keep the curson at the end of the select statement and click on the sql history and insert a valid sql query in the sql editor which will place a query with the semicolon ex;select * from APP.CUSTOMER; 4) now run the query and it will fail because the query generated from view data action didnt had a semicolan to its end of line which resulted in appending the sql history query to it which ultimatley breaks the query syntax. so the view data action query should contain a semicolon as well since when you apply this semicolon and run it will display resulting data from the two queries in separate data view table tabs.
As same behavior as in NB6.5, changing to RFE for the next release.
Reassigned to new owner.
The fix is not that invasive - this needs adjustment in the "Database Explorer" module (db), which contains the class: org.netbeans.modules.db.explorer.action.ViewDataAction line 84 needs to be ajusted: SQLEditorSupport.openSQLEditor(connection.getDatabaseConnection(), expression, true); I would change it to: SQLEditorSupport.openSQLEditor(connection.getDatabaseConnection(), expression + ";\n", true); This also inserts a newline character, which I as a user would prefer.
http://hg.netbeans.org/core-main/rev/58d032b9c6bc Fixed. Thank you.
Integrated into 'main-golden', will be available in build *201210160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/58d032b9c6bc User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #163710: View Data action query should contain a semicolon in generated sql query string