This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Look in any Java code that uses JDBC to access any database. The key for you would be to trace out the connection strings and the Driver class and names correctly. You could take a look at the following article. See if this helps you in any way Hooking up DB2 from Java
Seems like a batch job. Use prepared statements for better performance.
Don't read full flat file at a stretch. Instead read only sufficient information to create a record in db2.
Depending on the problem you can maintain transaction level at record level or file level. For record level after each record insert you need to commit. Else a single commit after every records are inserted.
Joined: Oct 12, 2005
thanks for the responses. there is a LOAD utility in db2 n just figured out that only i can use it directly in a statement would be have a stored procedure. The other way could be read file line by line calling Insert stmts at every iteration.