1 Reply Latest reply: Jan 3, 2013 2:51 PM by timvincent RSS

    How to load file using Java

      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
          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.....