Make your own free website on Tripod.com

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: inserting data



Hi!

I'm a total newbie to both JDBC and InstantDB. 

I have problems inserting data into a table.  The data causing
problems seems to be parentheses.  How do I get around that? 

Thanks,

Here's what I'm trying to run with ScriptTool: 

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

; Record all results

; Create the table and its index
e DROP TABLE lextable;
e CREATE TABLE lextable (
	eui		CHAR(8) PRIMARY KEY NOT NULL,
	entrydate       CHAR(6),
	base		VARCHAR (80),
	lexrecord       VARCHAR (500));
e CREATE INDEX baseindex ON lextable ( base );
p INSERT INTO lextable VALUES (?,?,?,?);
; put  data in the table
s E0419100, 082400, SSP, {base=SSP 
entry=E0419100
        cat=noun
        variants=inv
};
s E0021903, 082400, derivation, {base=derivation
entry=E0021903
        cat=noun
        variants=reg
        variants=uncount
	compl=(np,of)
};
s E0005931, 082400, United States Centers for Disease Control, {base=United States Centers for Disease Control
entry=E0005931
        cat=noun
        variants=uncount
};

q SELECT * FROM lextable;

c close;


--------------------------
and here's the error I get: 

java -Xms16m -Xmx32m org.enhydra.instantdb.ScriptTool lextable.txt
Enhydra InstantDB - Version 3.20 beta 1
The Initial Developer of the Original Code is Lutris Technologies Inc.
Portions created by Lutris are Copyright (C) 1997-2000 Lutris Technologies, Inc.
All Rights Reserved.

Connected to jdbc:idb:properties.txt
Driver   InstantDB JDBC Driver
Version  Version 3.20

lextable.txt DROP TABLE lextable
lextable.txt CREATE TABLE lextable (	eui		CHAR(8) PRIMARY KEY NOT NULL,	entrydate       CHAR(6),	base		VARCHAR (80),	lexrecord       VARCHAR (500))
lextable.txt CREATE INDEX baseindex ON lextable ( base )
lextable.txt INSERT INTO lextable VALUES ( E0419100 , 082400 , SSP , {base=SSP entry=E0419100        cat=noun        variants=inv} )
java.sql.SQLException: Invalid parameter number: 5
	at org.enhydra.instantdb.db.matchedTokens.setParam(matchedTokens.java:317)
	at org.enhydra.instantdb.db.SQLProg.setParam(SQLProg.java:162)
	at org.enhydra.instantdb.jdbc.idbPreparedStatement.set(idbPreparedStatement.java:249)
	at org.enhydra.instantdb.jdbc.idbPreparedStatement.setObject(idbPreparedStatement.java:242)
	at org.enhydra.instantdb.jdbc.idbPreparedStatement.setString(idbPreparedStatement.java:161)
	at org.enhydra.instantdb.SampleThread.run(ScriptTool.java:612)
	at java.lang.Thread.run(Thread.java:484)
lextable.txt INSERT INTO lextable VALUES ( E0005931 , 082400 , United States Centers for Disease Control , {base=United States Centers for Disease Controlentry=E0005931        cat=noun        variants=uncount} )
lextable.txt SELECT * FROM lextable
eui,entrydate,base,lexrecord
E0419100,082400,SSP,{base=SSP entry=E0419100        cat=noun        variants=inv}
E0005931,082400,United States Centers for Disease Control,{base=United States Centers for Disease Controlentry=E0005931        cat=noun        variants=uncount}
Database properties is shutting down...
Database properties shutdown complete.
-- 
                                          myriam

Go Proverb:

Beware of going back to patch up your plays.
-----------------------------------------------------------------------------
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.