Code example for PreparedStatement

Methods: executeUpdate, setBytes

0
            String stmt = null;
 
            try { 
	     stmt = "update usercobrand set footer=? where loginid="+loginid+" limit 1";
             query = conn.prepareStatement(stmt);
             query.setBytes(1, footer);
             query.executeUpdate();
	    } catch (Exception e) {
                throw new BaseDaoException("Error occured while executing usercobrand updating query, query = " + stmt, e);
            } 
	} 
}