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.
1. Connect to some DB and expand it's node. 2. Rightclick "Tables" node and choose "Create Table". 3. Add table with 2 columns. 4. Rightclick added table and choose "View Data". 5. Rightclick one of the column in database explorer and choose "Delete". 6. Click "Refresh" in data view window. Result: Deleted column is still shown.
I tried the same as per the steps a couple, I am unable to reproduce this. If you still think this is an issue, please provide exact details: database, table structure etc.
I still see this issue. But now all values disappear and result table becomes clean, but after refresh column should disappear and all values for the rest of columns should be refreshed. Note, that I'm talking about "Refresh" button in view data window, not about run statement again. Run statement again works fine and I don't see any problem with it. And that isn't the case of DB I guess, since I tried with MySQL and PostgreSQL and results are the same. I tried with table with 2 columns and INT type for both, but I think again that table structure isn't the case.
OK, I am not sure how to fix this. once data view is created the query can't be changed. In this case may be somehow we should tell user that unable to execute the query and user may have to do an editor level refresh by executing the run command again. There is nothing much I can do in the scope of data view.
Probably your suggestion isn't so bad, at least it is better than nothing. But how does "Refresh" work? Can you somehow run statement again from data view module? Why data can be refreshed, but table structure can't?
Data View provides an API which is called by the editor. When you delete the column from the table, there is no way data view get that information, so we need to an external refresh. So once the column the deleted, the dataview showing the result before the deletion is invalid, in other words the query is invalid hence it should throw exception and that is when we could clear the data and disable all the buttons.
Sorry, why can't you re-execute the query when the DataView refresh is called? BTW, I'm working on the Metadata API for the next release, and we should have listeners so you can detect when the metadata has changed. Ahi, you and I should talk about the Metadata API...
I think we are able to re-execute the query, but the issue is here is something to do with UI event. Sure, Lets talk on Metadata API.
ahimanikya, can You take a look at this issue? This issue is P2 and is going to be included into NetBeans 6.5 Patch 1. Please fix it till 27 November (this is code freeze date for Patch 1) or update this issue with justification why the fix isn't possible till this date. Thanks.
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Needs Verification http://hg.netbeans.org/main/rev/29ae81f1adf9
Needs Verification
Verified with build 081205.
One hunk from the changeset 29ae81f1adf9 has been rejected (see below) during import to the release65_fixes branch. After the manual import of the rejected hunk, the re-built IDE reports the error (see the attachment) when I click the Refresh in the step 6. from steps to reproduce ( BTW I'm running Sybase SQL ANywhere 11). Besides, once you run "View Data" above a table with the only one column and you add the second column via the Services tab after that, the Refresh in the view data window still shows the first column only. All in all, I don't think that the fix in the current condition can be ported into the branch in High Resistant mode - the release65_fixes. Could you please rethink whether the issue is a good candidate for 65patch2? If so, please provide improved patch. --- SQLExecutionHelper.java +++ SQLExecutionHelper.java @@ -415,11 +415,15 @@ class SQLExecutionHelper { } else { return; } - } catch (SQLException sqlEx) { - List<Object[]> rows = new ArrayList<Object[]>(); - dataView.getDataViewPageContext().setCurrentRows(rows); - NotifyDescriptor nd = new NotifyDescriptor.Message(sqlEx.getMessage()); + } catch (SQLException sqlEx) { + //List<Object[]> rows = new ArrayList<Object[]>(); + //dataView.getDataViewPageContext().setCurrentRows(rows); + String title = NbBundle.getMessage(SQLExecutionHelper.class, "MSG_error"); + NotifyDescriptor nd = new NotifyDescriptor.Confirmation(sqlEx.getMessage() + "." + NbBundle.getMessage(SQLExecutionHelper.class, "Confirm_Close"), title, NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.QUESTION_MESSAGE); DialogDisplayer.getDefault().notify(nd); + if (nd.getValue().equals(NotifyDescriptor.YES_OPTION)) { + dataView.removeComponents(); + } throw sqlEx; } finally {
Created attachment 75208 [details] Error
Ahi, can you look at this issue again? It will be better to have this fix in Patch 2, since it provides solid work flow to the user. So if you are able to provide improved patch, it will be very good. But if you can't (for any reason), then please change status whiteboard to '65fixes3-candidate'. Thanks.
No solution for the release65_fixes branch was provided by 65patch2 code freeze. The issues has been moved to 65patch3.
The status whiteboard "65fixes4-candidate" has been removed. At this time our proactive patches for the NetBeans 6.5.x IDE have concluded. If you own a Sun service plan contract for NetBeans, you may wish to contact Sun Service http://www.sun.com/contact/support.jsp to request a fix via the product defect escalation process. For more information on purchasing a Sun service plan contract for NetBeans, refer to the service plan item "Sun Software Service Plans (S3P) for Developers" in the Sun Service table found on our NetBeans Support Resources page http://www.netbeans.org/kb/support.html