Hello Alexander,

Yes that's right, but what about this:

import java.sql.*;


import exco.erp.db.Database;

public class Main {

 /**
  * Constructor for Main.
  */
 public Main() {
  super();
  try {

   Database db = new Database();

   Connection c = db.getConnection();
   c.setAutoCommit(false);

   Statement st = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = st.executeQuery("select * from ERP_PURCHASE_ORDERS_LINES
where id=160"); // rs is not empty

   rs.first();
   System.out.println(rs.getString(5));
   // output:    5.00

   Statement st2 = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);

   st2.executeUpdate("update ERP_PURCHASE_ORDERS_LINEs set quantity=6 where
id=160");

   rs.refreshRow();
   System.out.println(rs.getString(5));
   // I still see old values
   // output:    5.00

   c.commit();

  } catch (SQLException e) {
   System.out.print("Error: ");
   System.out.println(e.getMessage());
  }

 }

 public static void main(String[] args) {
  Main m = new Main();

 }
}


I still see old values



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to