Hi, I am developing a Servlet based app where I am permitting users to delete their own accounts. (PostgreSQL 7.03 and jdbc7.0-1.2.jar) I am using the following function - if I understand correctly the call "statement.executeUpdate();" should return an int that indicates the number of rows affected in the table. However whatever parameters are supplied, the call always returns 1. Is this correct? private void deleteAccount(Connection dbCon, HttpServletRequest req) { PreparedStatement statement = null; String template = "DELETE FROM tbl_users " + "WHERE username = ? " + "AND password = ? ;"; int rowsChanged = -1; try { statement = dbCon.prepareStatement(template); statement.setString(1, this.mstr_userName); statement.setString(2, req.getParameter("curr_password")); rowsChanged = statement.executeUpdate(); if(rowsChanged == 1) { //Send success message req.setAttribute("successMsg", "Your account was deleted."); } else if(rowsChanged != 1) { req.setAttribute("errorMsg", "Your account was not deleted."); } } catch(SQLException sqle) { System.err.println("sql exception" + sqle); } finally { closeStatement(statement); } } Thanks in advance for any help or advice. Regards, Neil. ---------------------------------------------------------------- From: Neil Kidd Website: http://www.kidd.org.uk E-mail: [EMAIL PROTECTED] ---------------------------------------------------------------- ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster