View Single Post
  #3 (permalink)  
Old 12-24-2007, 11:21 AM
jellyfish888 jellyfish888 is offline
Member
 
Join Date: Dec 2007
Posts: 7
jellyfish888 is on a distinguished road
This is the dit part which I think have a lot of problem...
Code:
public String editChristmasWishlist(String wish) { try { ConnectionManager con = new ConnectionManager(); Statement stmt = con.logOn().createStatement(); String msg = ""; String sql = "update from wishes where gift="+wish; if (stmt.execute(sql)) { msg = "update failed"; } else { msg = "update successfully"; } con.logOff(); return msg; } catch (SQLException e) { return "Add failed. SQL error " + e.getMessage(); } catch (java.lang.NullPointerException ne) { return "<p>Null error: " + ne.getMessage(); } }

Please help me make this code work...
Reply With Quote