SQL string trouble


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: SQL string trouble

  1. #1
    Steph Guest

    SQL string trouble


    I'm trying to create a table in Access97 using an SQL string in Java (jdk1.1.8).
    All's fine until I try to define a PRIMARY KEY, after that it compiles beautifully
    but won't run. Unable to ascertain whether the issue's with Java's jdbc/odbc
    bridge, SQL or Access, but am pretty positive it's not the SQL unless constraint
    statements run differently in Java. Err msg is "SQLException: [Microsoft][ODBC
    Microsoft Access 97 Driver] Syntax error in CREATE TABLE statement.

    Does anyone know of a workaround, or do I need to find an alternative bridge?

    Thanx,
    Steph

  2. #2
    Steph (again) Guest

    Re: SQL string trouble


    "Steph" <steph.fox@btinternet.com> wrote:
    >
    >I'm trying to create a table in Access97 using an SQL string in Java (jdk1.1.8).
    > All's fine until I try to define a PRIMARY KEY, after that it compiles

    beautifully
    >but won't run. Unable to ascertain whether the issue's with Java's jdbc/odbc
    >bridge, SQL or Access, but am pretty positive it's not the SQL unless constraint
    >statements run differently in Java. Err msg is "SQLException: [Microsoft][ODBC
    >Microsoft Access 97 Driver] Syntax error in CREATE TABLE statement.
    >
    >Does anyone know of a workaround, or do I need to find an alternative bridge?
    >
    >Thanx,
    >Steph



    - no wucking furries, I've cracked it!
    CONSTRAINT INDEX1 PRIMARY KEY (field)- it's a Microsoft thang, ennit?

    Cheers anyway,
    Steph


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center