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.

Autoincrement bei Access Frage.

Empfohlene Antworten

Veröffentlicht

Habe eine Acces Datenbank mit VB6 erstellt, (Visual Data Manager) und wollte bei einer "Räume" Tabelle die nie im Leben grösser als 255 Datensätze wird, ein Byte feld als Autoincrement nehmen. Aber irgenwie geht das net.

Es geht nur Long als Autoincrement

Jemand ne Ahnung wieso dass so ist ?

Das liegt an Access. Denn du weisst zwar, dass das nie mehr als 255 Räume werden, aber Acces weiss das nicht und will es auch gar nicht wissen. Es ist einfach so, und lässt sich IMHO auch nicht umgehen :P

Hallo,

Du kannst Dir auch einfach anstatt ein AutoFeld ein eigenes Feld generieren. Als Datentyp nimmst Du dann Byte oder was auch immer. Wenn Du dann einen neuen Datensatz einfügen willst, holst Du Dir vorher einfach den höchsten Wert aus der Tabelle und addierst 1 dazu. Z.B:

-----------------------------------------------------------------

Dim MaxID as Byte

' hole Max Wert

MaxID = CByte(NZ(DMax("Feld","Tabelle"),0) +1)

-----------------------------------------------------------------

Und somit hast Du quasi auch ein Autofeld mit Deinem Datentyp.

Gruß Meenzer

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.