Results 1 to 3 of 3
  1. #1
    DavidG24 is offline Member
    Join Date
    Apr 2009
    Posts
    49
    Rep Power
    0

    Default Java DB Application Netbeans

    hey guys,

    I am trying to create a basic Java DB application using netbeans and am using the Apache Derby Database so that I can easily embed the database into the application.

    Anyways I have created a database, and am now trying to insert a few tables into it using the SQL command window,

    I've tried the following
    Create Table _AARDVARK ( Words varchar(200) not null , _AARDVARK numeric(4,2) not null , _ANIMAL numeric(4,2) not null , _ANT numeric(4,2) not null , _ANTEATER numeric(4,2) not null , _MUSIC numeric(4,2) not null , _NOSE numeric(4,2) not null , _UGLY numeric(4,2) not null , _DICTIONARY numeric(4,2) not null , _FUR numeric(4,2) not null , _SHELL numeric(4,2) not null , _ZOO numeric(4,2) not null , primary key (Words) ) ;



    which generates the error :
    Error code -1, SQL state 42X01: Syntax error: Encountered "_" at line 1, column 14.


    I can't see what I'm doing wrong here in terms of the SQL (it works for a MySQL Database)
    Any ideas ??

    David

    ps I'm using the built in driver
    org.apache.derby.jdbc.ClientDriver

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Did you check in the Apache Derby manual to see if _ is allowed as first character of object names then?

  3. #3
    DavidG24 is offline Member
    Join Date
    Apr 2009
    Posts
    49
    Rep Power
    0

    Default

    <SOLVED>

    ....yeah that would be the intelligent thing to do

    Feeling like an idiot,

    Cheers,

    David

Similar Threads

  1. how to create Web application in Netbeans 6.7 ?
    By vivekhegde85 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-01-2009, 10:40 AM
  2. convert application to applet in netbeans
    By dbashby in forum New To Java
    Replies: 7
    Last Post: 04-18-2009, 03:49 AM
  3. Replies: 1
    Last Post: 03-27-2009, 05:47 PM
  4. connecting a java application to a DB in netbeans
    By kulangotski in forum Advanced Java
    Replies: 4
    Last Post: 03-22-2009, 09:58 AM
  5. Replies: 0
    Last Post: 07-30-2007, 11:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •