Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 96282 invoked from network); 2 May 2008 04:58:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2008 04:58:39 -0000 Received: (qmail 28134 invoked by uid 500); 2 May 2008 04:58:40 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 28104 invoked by uid 500); 2 May 2008 04:58:40 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 28093 invoked by uid 99); 2 May 2008 04:58:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 21:58:39 -0700 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dev.kamdar@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 04:57:54 +0000 Received: by fg-out-1718.google.com with SMTP id 13so1054278fge.43 for ; Thu, 01 May 2008 21:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=0+csffKnzBFl0O1z3QoDwEBuarZMx0Aqq+0/WI2QXJw=; b=LQTOc7Vng2EJU+5FOhx76ZhazJkC4C0lZqkFZLQKVu6zT45gYpaAACS8+UTpSGWL23dpn5A6QH90bm8vfBPzLzb6ARtvgtyZz2TsKUpATANFeAn7tgm4+KYgY9OSlOS3dqNNJgwotUIk2IVjF9loBb5YbtR1AttULzcvqFlolXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eTmwbgcPMBCPMpO/2uzZMazDL5eii8cY2pAnyWk3jhtnKHaNOO5Vh1saDWLbFGGMAFxLbhzelupHMrNt/L6153Q2S5GPr9ywqGf6xVszRFC0TOz0rXmiTWOHyJwVliZeIzJNnfzwBVo66mZoHAQAwdleNkPOlrKYqz+X+IiOL7o= Received: by 10.86.84.5 with SMTP id h5mr829468fgb.26.1209704286201; Thu, 01 May 2008 21:58:06 -0700 (PDT) Received: by 10.86.66.1 with HTTP; Thu, 1 May 2008 21:58:06 -0700 (PDT) Message-ID: <554abf880805012158s6b644df4t91a8f5f783a12493@mail.gmail.com> Date: Fri, 2 May 2008 10:28:06 +0530 From: "Devang kamdar" To: "Derby Discussion" Subject: Re: Cannot Use DROP in ALTER Table in NetBeans 6.0.1 (Derby Integrated) In-Reply-To: <4819C0BD.6050600@sun.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4054_25446923.1209704286198" References: <554abf880805010317t399a523cqb0018e4ff803912f@mail.gmail.com> <4819C0BD.6050600@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4054_25446923.1209704286198 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for the response Rick. I am not able to verify from the IDE. However, I checked the release notes online for NetBeans and it says, under tested drivers *Tested Drivers* NetBeans IDE 6.0 has been tested with the following databases and drivers. Driver Version Example URL JavaDB Derby 10.3.1.4 jdbc:derby://localhost:1527/sample (Network) Oracle Oracle Database 10g Release 2 (10.2.0.3) jdbc:oracle:thin:@//localhost:1521:ora9i PostgreSQL 8.2 Build 506 jdbc:postgresql:// jbrave-pc1.sfbay.sun.com:5432/postgres MySQL MySQL Connector/J 5.0.7Here is the link to NB Release notes: http://www.netbeans.org/community/releases/60/relnotes.html#sql-db Does this mean, its running 10.3.1.4 version of Derby(Java DB)? If I am not interpreting it correctly, is there a concrete way of checking, which version of Derby am I running? Also, if I am running an older version that is not supporting the DROP command, is there a way, I can integrate the newer version of JAVA-DB in NB? Cos NB is giving me a very easy and nice interface to work with Java DB and makes creating and populating tables much faster. OR as an alternative, are there any GUIs available to work with bare JAVA-DB database like toad? Please let me know your suggestions. Thanks Dev. On Thu, May 1, 2008 at 6:38 PM, Rick Hillegas wrote: > Hi Dev, > > Do you know what version of Derby you are using with Netbeans? Column > dropping and renaming were added to Derby in release 10.3.1.4. > > Hope this helps, > -Rick > > > Devang kamdar wrote: > >> Hi, >> >> I am trying to get started with Derby and Netbeans >> I am not able to use the DROP command. >> >> Getting following error in NetBeans (Derby Integrated) >> Error code -1, SQL state 42X01: Syntax error: Encountered "DROP" at line >> 2, column 1. >> Line 1, column 1 >> >> Here is the SQL statement: >> ALTER TABLE TRAN >> DROP COLUMN TRAN_DESC >> >> Also, is there a way to rename a column? >> Right now I am trying to DROP it and ADD it again. >> I am just creating the DB, so there is no data at present and this seems >> reasonable work-around. >> But what if my DB is populated? If I Drop the column, I will loose all the >> data? >> Is there a viable alternative? >> >> Please let me know. >> >> Thanks >> Dev. >> > > ------=_Part_4054_25446923.1209704286198 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for the response Rick.

I am not able to verify from the IDE.
However, I checked the release notes online for NetBeans and it says, under tested drivers
Tested Drivers

NetBeans IDE 6.0 has been tested with the following databases and drivers.

Driver
Version
Example URL
JavaDB Derby 10.3.1.4 jdbc:derby://localhost:1527/sample (Network)
Oracle Oracle Database 10g Release 2 (10.2.0.3) jdbc:oracle:thin:@//localhost:1521:ora9i
PostgreSQL 8.2 Build 506 jdbc:postgresql://jbrave-pc1.sfbay.sun.com:5432/postgres
MySQL MySQL Connector/J 5.0.7
Here is the link to NB Release notes:
http://www.netbeans.org/community/releases/60/relnotes.html#sql-db

Does this mean, its running 10.3.1.4 version of Derby(Java DB)?

If I am not interpreting it correctly, is there a concrete way of checking, which version of Derby am I running?

Also, if I am running an older version that is not supporting the DROP command, is there a way, I can integrate the newer version of JAVA-DB in NB?
Cos NB is giving me a very easy and nice interface to work with Java DB and makes creating and populating tables much faster.
OR
as an alternative, are there any GUIs available to work with bare JAVA-DB database like toad?

Please let me know your suggestions.

Thanks
Dev.

On Thu, May 1, 2008 at 6:38 PM, Rick Hillegas <Richard.Hillegas@sun.com> wrote:
Hi Dev,

Do you know what version of Derby you are using with Netbeans? Column dropping and renaming were added to Derby in release 10.3.1.4.

Hope this helps,
-Rick


Devang kamdar wrote:
Hi,

I am trying to get started with Derby and Netbeans
I am not able to use the DROP command.

Getting following error in NetBeans (Derby Integrated)
Error code -1, SQL state 42X01: Syntax error: Encountered "DROP" at line 2, column 1.
Line 1, column 1

Here is the SQL statement:
ALTER TABLE TRAN
DROP COLUMN TRAN_DESC

Also, is there a way to rename a column?
Right now I am trying to DROP it and ADD it again.
I am just creating the DB, so there is no data at present and this seems reasonable work-around.
But what if my DB is populated? If I Drop the column, I will loose all the data?
Is there a viable alternative?

Please let me know.

Thanks
Dev.


------=_Part_4054_25446923.1209704286198--