public DeleteItem ( ) {
}
public void loadDirver ( ) throws ClassNotFoundException, Exception {
Class.forName ( "oracle.jdbc.driver.OracleDriver" ) .newInstance ( ) ;
}
public boolean delete ( String num, String password ) throws SQLException {
String url = "jdbc:oracle:thin:@localhost:1521:etri" ;
Connection con ;
Statement stmt ;
boolean isNormalExit = false ;
con = DriverManager.getConnection ( url, "scott", "tiger" ) ;
stmt = con.createStatement ( ) ;
String query = "delete from board where bnum = " + num + " and bpassword = '" + password + "'" ;
System.out.println ( query ) ;
int rs = stmt.executeUpdate ( query ) ;
if ( rs == 1 ) isNormalExit = true;
else isNormalExit = false;
stmt.close ( ) ;
con.close ( ) ;
return isNormalExit ;
}
