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,

ich hab ein Problem mit einer VB.net Datenbankanwendung die ich zur Zeit entwickel. Datenbank ist MSSQL.

Mein Problem sieht wie folgt aus:

Ich hab 2 Tabellen, document und fulltext.

In der Tabelle fulltext ist ein Feld namens document_id welche die Referenzierung zur document Tabelle herstellt.

Im Quellcode habe ich nun über documentBindingSource.Addnew und FulltextBindingSource.Addnew neue Zeilen erzeugt die ich auch mit Daten fülle.

Beim Absenden in die Datenbank über Me.TableAdapterManager.UpdateAll(Me.documentdataset) fehlt der Fulltext Tabelle nun aber der Wert für document_id.

Ich hab schon versucht über SELECT @@identity an den Wert zu kommen, jedoch hab ich damit bisher keinen Erfolg gehabt.

Wie kann ich das Problem lösen?

Ich bin davon ausgegangen (Original Post: SELECT @@identity), dass er durch die Datenbank generiert wird und dann wäre das Vorgehen ja:

Datensatz einfügen, ID lesen, ID in das zweite SQL Statement einfügen (oder das ganze als Stored Procedure verpacken und es direkt in der Datenbank machen).

Phil

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.