Hmm, you might have been get trapped by one of the issues I mentioned in a 
previous mail 
(http://listserv.sap.com/pipermail/sapdb.general/2003-January/016829.html),
so please check if any of these ancillary conditions applies to your case.

We are at least thinking about the possibility of making 'refreshRow' more safe,
by re-executing the query and then repositioning again, but as this change would
be quit heavy-weight (in execution time, and also in the driver, as you need to
keep track for the parameters of prepared statements) don't hold your breath.

Regards
Alexander Schr�der
SAP Labs Berlin

> -----Original Message-----
> From: Andrius Vilciauskas [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 11:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: need some explanation on jdbc
> 
> 
> 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
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to