ResultSet.updateRow() throws SQLException: ORA-00904 - invalid identifier
Dear all,
when trying to update an updatable ResultSet using updateRow() method I retrieve a SQLException: "ORA-00904 - invalid identifier". It is strange, because before updating the row I used an update method like this:
results.updateString (int column, String newValue);
simplified code could look like that:
statement =
connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet results = statement.executeQuery("SELECT LOCATION_ID \"ID\", STATE \"Country\", CITY \"City\", SHRTCT \"Shortcut\" FROM LOCATIONS ");
// I retrieve the ResultSet which is completely OK
.......
int row, column;
String value;
....
// later I call this methods:
results.absolute(row+1);
results.updateString (column+1, value);
results.updateRow();
// when I wanna update e.g. a column "CITY" , method results.updateRow() throws an exception: "SQLException: ORA-00904: "CITY": invalid identifier"
Have it ever happened to anybody? Any advices?
Could SQL aliases be the problem?
Many thanks in advance, Rgds
Miroslav

