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: importing files with quotes in them


Hi,
 
I need to import data containing single quotes from a text file. I tried quoted all the string fields with double quotes, however it seems that this dosen't work.
 
for example I want to import data like:
 
1,"hmm", "data"
1,"a dog's life","blah"
3,"even more data","test"
 
I have an import_schema file that looks like this
ColNameHeader=False
CharacterSet=ANSI
Format=CSVDelimited
Col1=Id Integer
Col2=Data1 Char Width 30
Col3=Data2 Char Width 30
 
I am calling it from sql1.txt like this
e IMPORT DataDump FROM "data.txt" USING "schema.txt";
I get errors like
java.sql.SQLException: Unexpected EOF reached. Possible reason: mismatched quotes.
        at org.enhydra.instantdb.db.tokenList.parseTokens(tokenList.java:244)
        at org.enhydra.instantdb.db.tokenList.reset(tokenList.java:115)
        at org.enhydra.instantdb.db.FileImporter.getNextRow(FileImporter.java:290)
        at org.enhydra.instantdb.db.SQLProg.compile_import(SQLProg.java:874)
        at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:238)
        at org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
        at org.enhydra.instantdb.jdbc.idbStatement.executeUpdate(idbStatement.java:103)
        at org.enhydra.instantdb.SampleThread.run(ScriptTool.java:410)
        at java.lang.Thread.run(Unknown Source)
Is it possible to import data with single quotes in it?
 
Thanks in advance
 
cherio
 
Hamish Currie