This discussion is archived
1 Reply Latest reply: Jan 3, 2013 6:51 AM by Tim Vincent RSS

How to load file using Java

979857 Newbie
Currently Being Moderated
Hello,
I am trying to load file into the TimesTen (csv or txt) using Java language. I tried using query "LOAD DATA INFILE ..." but I received error that there is something wrong in word "DATA", later I tried to copy solution from sample programs written in Java but I get a lot of error which i couldn't solve. I also tried to use ttBulkCp in Java like this: query = {CALL ttBulkCp ... } but it wasn't working as well. There must be a way to load data from file to the TimesTen table using script written in Java, right?

Thank you for any ideas.
  • 1. Re: How to load file using Java
    Tim Vincent Explorer
    Currently Being Moderated
    If you take a look at the quickstart guide you get when you install the product you'll see a java code example called 'level3.java' which does what you want:

    This program uses the TimesTen JDBC driver to perform order processing operations:
    a) Connect to the database using the TimesTenDataSource interface
    b) Process all orders in the input3.dat file by inserting into the ORDERS and ORDER_ITEM tables.....

    Regards

    Tim

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points