CachedRowSet update problem

Discussion in 'Java' started by Seref Arikan, Nov 11, 2004.

  1. Seref Arikan

    Seref Arikan Guest

    Hi,
    I am trying to update some data in db using cachedrowset, and somehow, i
    could not manage to get it work. I am getting X number of conflicts
    exception, X being whatever the number of rows cachedrowset instance
    includes.
    It seems to be a bug or maybe something about drivers ? any ideas ?

    Info is as follows :
    Windows xp, j2se 1.5 (call it 5 if you like :) oracle db version 8.1.7

    code and exception are as follows
    ----------------------------------------------------------------------------
    -----------------------
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    CachedRowSet wrs = new CachedRowSetImpl();

    wrs.setCommand("select * from emp where ename='SMITH'");

    wrs.setUsername("scott");
    wrs.setPassword("tiger");
    wrs.setUrl("jdbc:eek:racle:thin:mad:localhost:1521:Oralocal");
    wrs.execute();
    wrs = wrs;
    wrs.setKeyColumns(new int[]{1});
    wrs.absolute(1);
    wrs.updateString(2,"Ahha update");
    wrs.updateRow();
    wrs.acceptChanges();
    ----------------------------------------------------------------------------
    -----------------------
    javax.sql.rowset.spi.SyncProviderException: 1 conflicts while synchronizing


    any help is appreciated a lot
    Best Regards
     
    Seref Arikan, Nov 11, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.