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 157011 - [65cat] org.netbeans.lib.ddl.DDLException: Unable to execute command: alter table "IFRAME"."IFRAME" drop "DESCRIPTIION" Syntax error: Encountered "drop" at line 1, column 31.
Summary: [65cat] org.netbeans.lib.ddl.DDLException: Unable to execute command: alter t...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rob Englander
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 17:51 UTC by pbelbin
Modified: 2009-09-24 09:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 145311


Attachments
stacktrace (1.38 KB, text/plain)
2009-01-18 17:51 UTC, pbelbin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pbelbin 2009-01-18 17:51:16 UTC
Build: NetBeans IDE Dev (Build 200901180201)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows Vista, 6.1, amd64

User Comments:
pbelbin: tried to drop a column on a database in derby (varchar(2048))



Stacktrace: 
org.netbeans.lib.ddl.DDLException: Unable to execute command:
alter table "IFRAME"."IFRAME" drop "DESCRIPTIION"
Syntax error: Encountered "drop" at line 1, column 31.
        at org.netbeans.lib.ddl.impl.AbstractCommand.execute(AbstractCommand.java:241)
        at org.netbeans.modules.db.explorer.node.ColumnNode.destroy(ColumnNode.java:246)
        at org.openide.nodes.FilterNode.destroy(FilterNode.java:604)
        at org.openide.explorer.ExplorerActionsImpl$DeleteActionPerformer.doDestroy(ExplorerActionsImpl.java:645)
        at org.openide.explorer.ExplorerActionsImpl$DeleteActionPerformer.actionPerformed(ExplorerActionsImpl.java:595)
        at org.openide.util.actions.CallbackSystemAction$DelegateAction$1.run(CallbackSystemAction.java:593)
Comment 1 pbelbin 2009-01-18 17:51:22 UTC
Created attachment 75952 [details]
stacktrace
Comment 2 Rob Englander 2009-01-18 18:57:12 UTC
I could be wrong but I didn't think Derby supported dropping of columns.  If I'm right
about that, the Delete action should not be enabled for a Derby column.  I think the bug
is in the DatabaseConnector.supportsCommand method.

I'll address this.
Comment 3 David Vancouvering 2009-01-20 19:07:06 UTC
It depends on the version of Derby.  As of version 10.3, you can issue ALTER TABLE DROP COLUMN.  So to do this right you
need to check the minor version of the *server* to see if you can issue the ALTER TABLE DROP COLUMN.

David
Comment 4 Rob Englander 2009-01-21 00:34:45 UTC
I'm not sure if our current approach to this stuff would allow us to
handle a minor rev differently.
Comment 5 Rob Englander 2009-01-21 19:19:59 UTC
89804578aea0

Java DB no longer providing ability to drop columns from the explorer.  I'll add an enhancement request to
look into providing support based on server revision.
Comment 6 Roman Mostyka 2009-01-22 13:58:51 UTC
Verified with build 090122.