Solved

JDBC - ODBC Driver

Posted on 2002-03-07
4
519 Views
Last Modified: 2008-02-01
I am trying to evaluate a product developed in Java that needs the jdbc or jdbc-odbc driver
which is implementing full features sepcified for the drivers. For example it is using functions
like isLast, previous on result set.

I have tried to link this product with oracale using the jdbc driver that comes with oracle but
I am getting following error:
java.sql.SQLException:Invalid operation for forward only resultset: isLast

 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)

at oracle.jdbc.driver.OracleResultSetImpl.isLast(OracleResultSetImpl.java:268)

If any of you know a jdbc or jdbc-odbc driver for oracle that you think can work in this
scenario please do let me know.

The product spec is explicitly stating that the drivers provided by sun are not supporting the
functionality needed by this product.

I will appreciate any info and help in this regard.

0
Comment
Question by:arooj_aftab
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 6849306
Which versions of the Oracle driver have you tried? The Oracle drivers have been JDBC 2.0 compliant for quite some time now but you have to get the classes12.zip distribution, not classes111.zip. The URL to download the drivers is http://technet.oracle.com/software/tech/java/sqlj_jdbc/content.html. You'll have to register for a free OTN account if you don't already have one.

The SQLException you are getting is usually a programming error. To be scrollable, the Statement producing the ResultSet must have been created using one of Connection's Statement factory methods (createStatement or prepareStatement) that takes resultSetType and resultSetConcurrency parameters. Without specifying these parameters, the Connection will by default create Statement objects that have forward-only type and read-only concurrency.

It is my recollection that you'll usually get a different SQLException when the driver doesn't support the requested operation.

Best regards,
Jim Cakalic
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7902218
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts removed
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 7903898
OK.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7963078
Per recommendation, points NOT refunded and question closed.

Netminder
EE Admin
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question