Hi all, My issue is that I want to skip the updation of one parameter, without getting an exception. I am not setting the first parameter.Here is the code snippet. Can anyone please help ? con=ConnectionManager.getConnection(); PreparedStatement ps = con.prepareStatement("UPDATE GIFI SET DESCRIPTION=?,TYPE=? WHERE ACCNO=?"); ps.setString(2, "CHEQUE"); ps.setString(3, "1000"); System.out.println(ps.execute()); Thanks Manu
It doesn't make sense to skip a parameter, as the resulting SQL would look something like this: UPDATE GIFI SET DESCRIPTION=?,TYPE='CHEQUE' WHERE ACCNO='1000' Don't you see the problem with the bad resulting SQL?