Example #1
0
  public void AddToDatabase() {
    String recipe = txt_Recipe.getText();
    String rating = cb_Rating.getSelectedItem().toString();
    String genre = txt_Cousine.getText();

    String commandText =
        "INSERT INTO dish (Recipe,Rating,Genre) VALUES ("
            + "'"
            + recipe
            + "',"
            + "'"
            + rating
            + "',"
            + "'"
            + genre
            + "')";
    SQL.UpdateResultSet(commandText);
    GetDishID();
  }