Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

folgende Situation: Immer wenn ein Button geklickt wird soll folgendes ausgeführt werden:

INSERT INTO Vokabeln

VALUES

(1, 'test', 'test', 'test')

Das Problem ist jetzt die eins ist ja der Primarykey, der soll sich ja jedes Mal um eins erhöhen. Kann man da jetzt sowas wie ++1 oder sowas in der Richtung schreiben?

MfG: Meister_Racer

  • Autor

Also das mit der ID hat sich gerade erledigt, da Access bei der ID ja den Typ "AutoWert" angibt das heißt ja bei jedem neuen Datansatz zählt der sowieso hoch. Habe jetzt aber ein anderes Problem:

wenn ich jetzt einfach die ID spalte weglasse:

INSERT INTO Vokabeln

VALUES

('test', 'test')

dann kommt folgende Fehlermeldung: "Anzahl der Abfragewerte und Zielfelder stimmt nicht überein"

Wenn ich jetzt für die ID spalte zB null schreibe dann kommt eine Fehlermeldung weil der Datentyp nicht passt.

Alternativ kannst du auch NULL als Wert für dein Primärschlüssel-Feld angeben.

INSERT INTO table (id, sonstwas) VALUES (NULL, 'sonstwas');
Bzw. wenn du wie in #2 arbeiten willst:
INSERT INTO table VALUES (NULL, 'wert1', 'wert2', ...);

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.