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 OJDBC resultset type and concurrency problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "OJDBC resultset type and concurrency problem" Watch "OJDBC resultset type and concurrency problem" New topic
Author

OJDBC resultset type and concurrency problem

go shangai
Greenhorn

Joined: Nov 27, 2007
Posts: 1
Hello,

we are using a stored procedure in oracle in order to get some info out of the database. This stored procedures has one IN param (id) and one OUT param (OracleTypes.CURSOR)
stm = conn.prepareCall("(ExamenPackage.usp_getExam(?,?)}, OracleResultSet.TYPE_SCROLL_SENSITIVE, OracleResultSet.CONCUR_UPDATABLE);

rs = stm.getCursor(2);

Notice above, we specify the type of the rs as SENSITIVE and the cocurrancy as UPDATABLE.
For some reason JDBC determins that the specified type & concurrancy is unsuitable and makes the resultset TYPE_FORWARD_ONLY & CONCUR_READ_ONLY.

Which gives us a problem when we try to perform rs.last();

Does anybody know the solution to our problem?
(Hoping it is possible to change the type of resultset to the correct type).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OJDBC resultset type and concurrency problem
 
Similar Threads
Resultset.next() taking more time
Need a disconnected resultset
Displaying Image from database on to the screen
What am i doing wrong here? ( Stored Procedure REF CURSOR Problem)
java stored procedure problems