1
连接工作正常。我能够插入行,但 越来越异常(的SQLException:ORA-00933:SQL命令不能正确地结束)。在更新表,使用下面的代码 (BOX_ID是整数,其余都为varchar)使用jsp更新动态数据更新查询
PreparedStatement p_statement2=connection.prepareStatement("UPDATE TOYS_TABLE SET NAME= ? VENDOR=? LABLE=? WHERE NAME=? AND BOX_ID=?");
p_statement2.setString(1, "abc1");
p_statement2.setString(2, "abc2");
p_statement2.setString(3, "abc3");
p_statement2.setString(4, "XYZ123");
p_statement2.setInt(5,11);
try
{
p_statement2.executeUpdate();
p_statement2.close();
}
catch(Exception kl)
{
kl.toString();
p_statement2.close();
}
thriks a man man – 2013-04-29 05:18:56