Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send list of values to DB2 from java

Status
Not open for further replies.

praveenkrishnan81

Programmer
Apr 9, 2007
2
0
0
US
Hi,

In our project, we are trying to do a bulk insertion of records into the DB2 system.
We have decided to write a stored proc to accomplish the same. Is there any way to pass on a list of values to do the insert.
A better explanation of the scenario would be the following example.

Let us assume i have a emp table in DB2 with structure as follows.
{
Emp_id,
Emp_name,
Emp_dept_id
}

In Java, i have list of Employee java objects. This needs to be inserted into te DB2 table
 
This should be carried out in the Java forum, this one is just for J2EE questions.

Anyway, I think you have to iterate through all your objects to collect the data and then

1.- Insert data on each iteration
2.- Gather all data and pass it to your stored procedure.

Cheers,
Dian
 
I think, i was not clear with the problem. I am trying to find out ways of sending an array to the DB2 stored proc. I searched in various forums, but lots of them tell that it is not possible to send array to DB2 Stored proc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top