DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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


Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links