jdbc - insert prepared statement in database with parameters -
in code i'm using prepared statement insert 7 parameters :
connection.preparestatement(inserttablesql); preparedstatement.setstring(1,"31/07/12"); preparedstatement.setint(2, 1); preparedstatement.setint(3, 2); preparedstatement.setint(4, 3); preparedstatement.setint(5, 4); preparedstatement.setint(6, 4); preparedstatement.setfloat(7, 6); preparedstatement.executeupdate();
it work way , row inserted, whenever try bind parameter variable such as:
int = 1; preparedstatement.setint(6, i);
it doesnt work during execution, thread endlessly waiting without error , no row inserted. if row existed still exception unique constraint. doing wrong here?
thanks.
Comments
Post a Comment