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.

Java Oracle Hilfe

Empfohlene Antworten

Veröffentlicht

Hallo!

Ich bin JAVA Newbie und schreib grad an einem Tool, was Oracle Datenbank Tabellen updaten kann. Also von einer Master DB die Daten auslesen, die Client DB updaten funktioniert schon, nur wenn jetzt in der Master DB ein neuer Eintrag steht muß der doch mit INSERT in die Client DB übertragen werden. Also WENN in Master DB eine neue ID ist dann INSERT ansonsten update. Hört sich einfach an nur ich bekomm den neuen Eintrag nicht raus.

void jButton2_actionPerformed(ActionEvent e)

{

String txtSQLA = "SELECT ID,MENU,Deutsch,Englisch from scott.LANGUAGE1";

ResultSet rs2 = null;

String updSQL;

int count=1; // Startwert, ab dem der RS kopiert wird.

try

{

rs = stmtA.executeQuery(txtSQLA);

rs.first();

do

{

String txtSQLB = "SELECT ID FROM scott.language2 WHERE ID = "+rs.getInt("ID");

rs2 = stmt.executeQuery(txtSQLB);

rs2.first();

if(rs2.getBoolean()= null)

{

jTextArea1.append(String.valueOf(rs2.getInt("ID")));

//updSQL = "INSERT INTO scott.LANGUAGE2 (ID, MENU, DEUTSCH, ENGLISCH) VALUES(" + rs.getInt("ID") + ",'" + rs.getString("MENU") + "','" + rs.getString("Deutsch") + "','" + rs.getString("Englisch") + "')";

updSQL = "UPDATE "+ jTextField9.getText() +" SET ID = '"+rs.getInt("ID")+"', MENU = '"+rs.getString("MENU")+"', DEUTSCH ='"+rs.getString("Deutsch")+"', ENGLISCH = '"+rs.getString("Englisch")+"' WHERE ID = " + rs.getInt("ID");

//jTextArea1.append(updSQL);

stmt.executeQuery(updSQL);

}

else

jTextArea1.append("No update" + rs.getInt("ID"));

}while (rs.next());

}

catch (Exception e1)

{

System.out.println("Exception bei DataImport");

e1.printStackTrace();

}

}

Danke

General Chang

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.