1
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Global.database ="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\\DB\\swift_db_14.accdb;";
Global.conn = DriverManager.getConnection(Global.database, "", "");
Global.s = Global.conn.createStatement();

Global.s.executeUpdate("INSERT INTO swiftRecord(payLine1)VALUES ('') RETURNING recID");

Global.uniNum.setText(Global.rs.getString("recID"));

Here within this code im trying to insert a new blank record and get its unique id which is recID, i want to display recID on a form and when the user is done filling up the fields it will then save/update the row of recID. i want to know how i can get the value of the latest row created by the command i created.

Kayel
  • 11
  • 6

0 Answers0