File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

order by with updatable SCROLL_SENSITIVE gives problem

Vikram Kamate
Greenhorn

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.
SELECT AGENT_CLIENT_ID, LAST_CYCLE_DATE
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
Vikram
Peter den Haan
author
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.
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: order by with updatable SCROLL_SENSITIVE gives problem
 
Similar Threads
ResultSet is not updateable.
What will be a good approach for sorting data extracted from DataBase.
Problems with ResultSetMetaData getTableName()
JDBC API 2.0 Help...
Executing one resultset inside another