2008-06-12 04:50:31 UTC
sqlQuery = "insert into Customers values(" +
txtCustNo.getText() + ", '"+
txtName.getText() + "', '" +
txtPhone.getText() + "', #" +
txtBDay.getText() + "#)";
n = stmt.executeUpdate(sqlQuery);
But now I need to search the database and I am having lots of trouble. I really don't know how ot start. Here is what I have
String sqlQuery = "select * " + "from Customers where Name Like '" + namemem + "';";
System.out.println(sqlQuery);
n = stmt.executeUpdate(sqlQuery);
I am searching for a name so I want to have the user only put in a few letters of the name and the results pop up in a JOptionWindow.
any thoughts?