470,815 Members | 1,104 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Problem batching stored procedure calls using JDBC


Hi.

I have a DB2 stored procedure that I call using JDBC. Now I'm trying to
batch the call. This is done by the book:

stmt = connection.prepareCall(" ... ");

stmt.setString(1, "foo");
stmt.addBatch();

stmt.setString(1, "bar");
stmt.addBatch();

stmt.setString(1, "baze");
stmt.addBatch();

stmt.executeBatch();

It appears that the stored procedure only gets invoked once - so after
the above there's only one record in the table the SP writes to, namely
the first ("foo").

Using same methodology I can make batching of prepared staetments work
fine.

Any tips?

Thanks.

Morten

Nov 12 '05 #1
0 1329

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Hawkeye | last post: by
3 posts views Thread by Jarrod Morrison | last post: by
2 posts views Thread by Marc Stiegele | last post: by
2 posts views Thread by Kent Lewandowski | last post: by
3 posts views Thread by Mark | last post: by
6 posts views Thread by Liang Zhang | last post: by
3 posts views Thread by jynxxxed | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.