Solved

JDBC - ODBC Driver

Posted on 2002-03-07
4
513 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now