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: java.sql.SQLException


Hi Peter!
I got a java.sql.SQLException error trying to import same data from a
txt-file into a instantdb database.
You will find all data and declarations used in the attached files.
What's going wrong?
Thanks in advance!!!
Juergen

-- 
Juergen Roeder
Stettiner Strasse 8
D-61348 Bad Homburg v.d.H.
Hessen, Germany
---------------------------------------
Fon    +49 6172 969948
Fax    +49 6172 969913
Mobile +49 173 3162452
---------------------------------------
Natl. eMail: juergen-roeder@t-online.de
Intl. eMail: juergen_roeder@hotmail.com
---------------------------------------
E:\InstantDB\Tarifbuch>java -Xms16m -Xmx32m org.enhydra.instantdb.ScriptTool import_kz.txt
Enhydra InstantDB - Version 3.25
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:tarifbuch.prp
Driver   InstantDB JDBC Driver
Version  Version 3.25

import_kz.txt IMPORT Kz FROM "./import/kz.dat" BUFFER 4096
Error importing line 1
9,"07","Lastschrift 2. Bankverbindung (noch nicht programmiert)"
java.sql.SQLException: java.sql.SQLException: Column kz_text cannot accept value Lastschrift 2. Bankverbindung (noch nicht program
miert)
        at org.enhydra.instantdb.db.Table.addRowAtRow(Table.java, Compiled Code)
        at org.enhydra.instantdb.db.SQLProg.compile_import(SQLProg.java, Compiled Code)
        at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:238)
        at org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java, Compiled Code)
        at org.enhydra.instantdb.jdbc.idbStatement.executeUpdate(idbStatement.java:103)
        at org.enhydra.instantdb.SampleThread.run(ScriptTool.java, Compiled Code)
        at java.lang.Thread.run(Thread.java:479)
Database tarifbuch is shutting down...
Database tarifbuch shutdown complete.

kz.dat

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

; ==============================================================
; Record all results
; ==============================================================
e SET EXPORT "./export/Kz.dat" FIXEDLENGTH COLNAMEHEADER ROWNUMBERS CONTROLCOL SUMMARYHEADER;

; ==============================================================
; Drop the table and its index
; ==============================================================
e DROP INDEX kz_nr_idx;

e DROP TABLE Kz;

; ==============================================================
; Create the table and its index
; ==============================================================
e CREATE TABLE Kz (
kz_nr       INTEGER                       NOT NULL  PRIMARY KEY 
			FOREIGN KEY    REFERENCES  Kzname (kzn_nr),
kz_inhalt 	CHAR(3)                       NOT NULL  PRIMARY KEY,	
kz_text     CHAR(50)                      NOT NULL
);

e CREATE INDEX kz_nr_idx ON Kz ( kz_nr ASC );

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

; ==============================================================
; Import some initial data in the table
; IMPORT <table> FROM [URL] <filename> [USING <schema>] [BUFFER <rows>];
; ==============================================================
e IMPORT Kz FROM "./import/kz.dat" USING "import_schema_kz.txt" BUFFER 4096;
;e IMPORT Kz FROM "./import/kz.dat" BUFFER 4096;

; ==============================================================
; Close
; ==============================================================
c close;

[Kz.dat]
ColNameHeader=False
CharacterSet=ANSI
Format=CSVDelimited
Col1=kz_nr Integer
Col2=kz_inhalt Char
Col3=kz_text Char