private final String ADD_INSTRUCTIONS = "INSERT INTO COOKIE_VALUES VALUES (DEFAULT, ?, ?)"; // Datensätzte
private final String UPDATE_VALUES = "UPDATE COOKIE_VALUES SET COOKIES_PRO_KLICK= ?, ANZAHL_COOKIES= ?";
if (!tables.next()) { // Nur erstellen wenn Datenbank noch nicht vorhanden ist
Statement instructions = connection.createStatement();
instructions.executeUpdate(CREATE_DATA_TABLE);
PreparedStatement insertStatement = connection.prepareStatement(ADD_INSTRUCTIONS);
insertStatement.setInt(1, 1); // hier wirds auf 1 gesetzt. Und zwar nur beim ersten Programmstart, danach wird immer der wer genommen, der hinter cookies_Pro_Klick steckt.
insertStatement.setLong(2, anzahl_Cookies);
insertStatement.executeUpdate();