Are you using jdk 1.5 or an earlier version. If you are not using 1.5 then the following lines
must be changed:
for (String val : vals) {
pStmt.setString(1, val);
pStmt.execute();
to:
for (int i = 0; i < vals.length; i++) {
pStmt.setString(1, vals[i]);
pStmt.execute();
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan