The moose likes JDBC and the fly likes order by with updatable SCROLL_SENSITIVE gives problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "order by with updatable SCROLL_SENSITIVE gives problem" Watch "order by with updatable SCROLL_SENSITIVE gives problem" New topic

order by with updatable SCROLL_SENSITIVE gives problem

Vikram Kamate

Joined: Sep 28, 2002
Posts: 16
Hi all,
I am opening a updatable and scrollable resultset on Oracle table. My sql query is simple I am quring single table but I have order by cluase in my query. Query excuted successfuly.
but next() method on resultset gives problem for 10 iteration. then I changed statement.setFetchSize(20) now its giving for problem on 20th if I remove order by it works fine. but I want ordered records.
some buddy suggested.
from (select AGENT_CLIENT_ID, LAST_CYCLE_DATE from commission_detail order by AGENT_CLIENT_ID)
but then update dosent work.
please help me.
thankx in advance
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
What problem do you get? Does it fail silently or do you get an exception -- and if you get an exception, can you post stack trace, SQL error code and SQL state?
- Peter
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I'm pretty sure you can't update using a join or correlated subquery. This means that it would not be possible to create an updateable resultset using a query that contains one.
I agree. Here's the link: http://aspose.com/file-tools
subject: order by with updatable SCROLL_SENSITIVE gives problem
Similar Threads
What will be a good approach for sorting data extracted from DataBase.
Problems with ResultSetMetaData getTableName()
ResultSet is not updateable.
JDBC API 2.0 Help...
Executing one resultset inside another