Hello,
Is this code correct ? If so why I don's see changes ?
If see changes only if I restart program.
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();
Statement st = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = st.executeQuery("select * from ERP_PURCHASE_ORDERS_LINES
where id=160");
while (rs.next()) System.out.println(rs.getString(5));
}
Statement st2 = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
st2.executeUpdate("update ERP_PURCHASE_ORDERS_LINES set quantity=5 where
id=160");
rs.refreshRow();
System.out.println(rs.getString(5));
// I don't see any changes. It's looks like refreshRow down't work
c.commit();
} catch (SQLException e) {
System.out.print("Klaida: ");
System.out.println(e.getMessage());
}
}
public static void main(String[] args) {
Main m = new Main();
}
}
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general