1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| private void insertMember(MemberBean mb){ try { con = getCon(); sql = "insert into fun_member values (?,?,?,?,?, " +"?,?,?,?)"; pstmt = con.prepareStatement(sql); pstmt.setString(1, mb.getId()); pstmt.setString(2, mb.getPw()); pstmt.setString(3, mb.getName()); pstmt.setString(4, mb.getEmail()); pstmt.setInt(5, mb.getBirth()); pstmt.setString(6, mb.getGender()); pstmt.setString(7, mb.getAddr()); pstmt.setString(8, mb.getMobile()); pstmt.setDate(9, mb.getRe_date()); pstmt.executeUpdate(); System.out.println("회원가입성공"); } catch (NamingException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } catch (Exception e) { System.out.println("회원가입성공"); e.printStackTrace(); } finally { closeDB(); } }
|