this is my 9th hour today and i have decided to finally reach out and seek a little bit of help because i am really struggling with this. I have been googling for hours and i can't seem to find a suitable solution for what i am looking for.
The background, I am using Java DB to store my info and then pulling it up using a query and then trying to get that into an existing JTable, but i am not doing very well at all. Im sure there will be a very simple answer to this, so i seek help from anyone who can help! Any advice is much appreciated!
This is how far I have gotten so far, i have already created the table with the correct columns and it is inside the program, not a pop up table, i really dont have a clue and i thank you in advance!
String URL = "jdbc:derby://localhost:1527/Teams";
String Usr = "admin";
String Pwd = "password";
try {
Connection con = DriverManager.getConnection(URL,Usr,Pwd);
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
String SQL = "SELECT * FROM RESULTS";
ResultSet rs = stmt.executeQuery( SQL );
while(rs.next()){
int GAMEID = rs.getInt("GAMEID");
String HOEMTEAM = rs.getString("HOMETEAM");
String SCORE = rs.getString("SCORE");
String AWAYTEAM = rs.getString("AWAYTEAM");
}