Good Morning all,

I need some help with loading a file into a sybase IQ table with the "LOAD INTO" statement.
I have never used it before and I cant seem to get myhead around how I am supposed to implement it in my java app.

I have a stateless ejb that does file pick up and copy.
After that I used a bufferedreader to extract the stuffs from the file, put it in an array and then used the collection to persist it.

Thing is, it still takes too much time.
I was told to use the Sybase IQ LOAD INTO table statement, but as yet, I havent come across an example of how to use it.

Can anyone either point me in the right direction to a java implemetation of this or please provide an example.
thank you,
Miyuki

have you got database drivers? you will most likely need to import some library which is going to include the drivers, you will then create a connection to the database. only after this will you be able to query the database.

running the query was not the problem.
connection was not not the problem either.

the sybase home turned out to be the issue since it was on a remote mech. and i was doing the processing locally.

This has been resolved. thanks.
for anyone who wants to know:
1 - pickup, copy and ready file processing
2 -

Query q = entityManager.createNativeQuery("LOAD TABLE id_cat(idC) FROM "+ fileName2 +
                                            " QUOTES OFF  ESCAPES OFF " +
                                            "DELIMITED BY "+  delim + " ROW DELIMITED BY " + newLine );
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.