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.

Problem mit updateRow() auf SQL Server 2005

Empfohlene Antworten

Veröffentlicht

Hallo Leute!

Ich habe leider noch keine große Erfahrung mit Java in Verbindung mit SQL Server 2005.

Ich habe einen lokalen SQL Server 2005 installiert und möchte nun eine Tabelle in der Datenbank DivTests updaten..Zeile für Zeile...

Der Verbindungsaufbau funktioniert perfekt...ich erzeuge ein Statement welches Scrollable und Updateable ist...auch das funktioniert noch..

jedoch beim ersten Aufruf der Funktion updateRow() kommt folgende Fehlermeldung:

Could not find server 'S0061' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

Hier noch der Relevante Code:


Statement s = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);

//......hier wird eine Funktion aufgerufen die das ResultSet liefert

rs.updateString("ID", String.format("%tY%tm%td%08d", c,c,c,counter));

rs.updateRow(); //Hier tritt der Fehler auf

Ich habe dann wie in der Fehlermeldung beschrieben die StoredProcedure sp_addlinkedserver aufgerufen, ab diesem Zeitpunkt habe ich dann diese Meldung bekommen:

The cursor does not include the table being modified or the table is not updatable through the cursor.

du aktualisierst (via updateRow oder UPDATE) eine TABELLE oder VIEW, die durch den verbindungsserver (S0061) nicht UPDATEable ist. das kann im sinned es erfinders sein, muss es aber nicht.

s'Amstel

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.