Here is the code for what I have done so far

public void removeBank(int bankNo)

myCon = DriverManager.getConnection(myURL,userID,password);
stmt = myCon.createStatement();
rs = stmt.executeQuery("Select * from Banks);

//stmt1 = myCon.createStatement();
rs = stmt1.executeQuery("Delete from Banks where BankNo = " + bankNo);


catch(Exception e)

}//end method

The way I see it is that I first create a resultset containing the info I
need. Then I delete from that resultset only the specified record, but still
it throws me an exception stating no resultset was created.