InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InstantDB: Parse error caused by keyword REFERENCE in CREATE TABLE statement


Hi,
I'd appreciate if someone could mail me the solution to the following 
problem:

By executing the following script

   ; First load the JDBC driver and open a database
   d org.enhydra.instantdb.jdbc.idbDriver;
   o jdbc:idb=beispiel.prp;

   ; Create two tables
   e DROP TABLE Mitarbeiter;
   e CREATE TABLE Mitarbeiter
   (
       nummer     INTEGER  NOT NULL,
       vorname    VARCHAR(32) DEFAULT "" NOT NULL,
       nachname   VARCHAR(32) DEFAULT "" NOT NULL,
       orgeinheit VARCHAR(32) DEFAULT "" NOT NULL,
       oid        DECIMAL(19,0) NOT NULL PRIMARY KEY,
       version    INTEGER NOT NULL
   );
   e CREATE INDEX I1_Mitarbeiter ON Mitarbeiter ( nummer );

   e DROP TABLE Produkt;
   e CREATE TABLE Produkt
   (
       nummer INTEGER  NOT NULL   ,
       name VARCHAR(32) DEFAULT "" NOT NULL   ,
       beschreibung VARCHAR(32) DEFAULT "" NOT NULL   ,
       verantwortlicher DECIMAL(19,0) REFERENCES Mitarbeiter ( oid ) ,
       oid DECIMAL(19,0) NOT NULL PRIMARY KEY,
       version INTEGER NOT NULL
   );
   CREATE INDEX I1_Produkt ON Produkt ( nummer );


   ; Record all results
   e SET EXPORT "export0.txt" FIXEDLENGTH COLNAMEHEADER ROWNUMBERS 
CONTROLCOL SUMMARYHEADER;

   c close;

I always get the SQL parse error message

   ...
   CREATE TABLE Produkt (...)
   Don't understand SQL after "CREATE"
   Expected: "Default" found: "REFERENCES"
   ...

(Note, there's no problem creating the first table "Mitarbeiter").

Here's some additional information describing our environment:
 
  Operating system? Windows 2000 
  Java Virtual Machine™? Sun JDK 1.2.2

with best regards

Thilo

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.