I have an Oracle 10gR2 database with an IOT table inside:
create table countries ( id number primary key, name varchar2(30) not null enable ) organization index;
I am trying to update table values ββwith this Java code (version 1.6):
Statement stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); ResultSet src = stmt.executeQuery("select id, name from countries"); src.next(); src.updateString("name", "__test__"); src.updateRow();
But updateRow raises a SQLException (ORA-01410: invalid ROWID). If I try to update a bunch of (regular) table - everything works.
I use this code with different versions of oracle drivers (from here http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html )
After some research, I found that the IOT and HEAP table has a different rowids format:
IOT Example * BAJzKgwCwRb +
HEAP Example AAAbgVAAJAAMyr8AAA
But I still do not know how to solve this problem. Do you have any ideas?
source share