Page 875 - 3-2
P. 875

int rs = stmt.executeUpdate(sql);
                                                            //rs.close();
                                                            stmt.close();
                                                            conn.close();
                                                    }catch(SQLException se1){
                                                            se1.printStackTrace();
                                                    }catch(Exception ex){
                                                            ex.printStackTrace();
                                                    }finally{
                                                            try{
                                                                    if(stmt!=null)
                                                                            stmt.close();
                                                            }catch(SQLException se2){
                                                            }
                                                            try{
                                                                    if(conn!=null)
                                                                            conn.close();
                                                            }catch(SQLException se){
                                                                    se.printStackTrace();
                                                            }
                                                    }
                                                    //maker();
                                    }
                            });
                            button1.setBounds(14, 12, 155, 36);
                            contentPane.add(button1);


                            contentPane.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
                            jframe.setBounds(100, 100, 500, 301);
                      //ServerMain sm = new ServerMain();




              }


              public static void spark() {
                      Connection conn = null;
                            Statement stmt = null;
                            try{
                                    Class.forName(JDBC_DRIVER);
                                    conn = DriverManager.getConnection
                                                                    (DB_URL,USERNAME,PASSWORD);
                                    stmt = conn.createStatement();
                                    //System.out.println("spark");
                                    String sql;
                                    sql = "update project set spark = '"+spark+"'


                                                         - 875 -
   870   871   872   873   874   875   876   877   878   879   880