*I am working on a program and already have everything working and I can query the database as well as add and delete enteries and navigate, but the search portion is not working I want to be able to search by item # from the database, is there anything you can see I am missing or should attempt?
If more clarification is needed please ask
//1st File
public static Game searchRecord(
String search) throws SQLException{
String query = "SELECT* " + "FROM gamefields WHERE SKU = '" + search + "' ORDER BY SKU ASC";
Game lastGame = new Game(gamefields.getString(1),
gamefields.getString(2),
gamefields.getString(3),
gamefields.getString(4),
gamefields.getString(5),
gamefields.getString(6),
gamefields.getString(7),
gamefields.getDouble(8));
Statement statement = connection.createStatement(); //Creates connection
//statment to database
statement.executeUpdate(query); //Executes the delete query and Updates the database
statement.close();
close();
open();
return lastGame;
//2nd File
public void keyPressed(KeyEvent e){
int keyCode = e.getKeyCode();
if (keyCode == KeyEvent.VK_ESCAPE){
performGameDisplay();
enableButtons(true);
SKUField.requestFocus();