aspose file tools*
The moose likes JDBC and the fly likes JDBC-UnsupportedOperationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-UnsupportedOperationException" Watch "JDBC-UnsupportedOperationException" New topic
Author

JDBC-UnsupportedOperationException

Tejas Kansara
Ranch Hand

Joined: Dec 14, 2000
Posts: 38
Well, I am working on JDBC right now but many a times I get the following error "UnsupportedOperationException".
When I use the following methods, I am getting the above mentioned exception.
* con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
* rs.beforeFirst();
etc.....
Pour some light on it.
THANX.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
It means that the JDBC driver you are using does not support the operation. You may wish to try to find a better driver that more fully supports JDBC 2.0 functionality.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Tejas Kansara
Ranch Hand

Joined: Dec 14, 2000
Posts: 38
Dear friend,
You may be right !!! But using the same CD's I am installing JDK,Windows and Oracle on different machines.
The result is its working on some machine and its not on certain machines.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
is the windows env same on all the machines!
the jdk version, classpath etc etc....

- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
sabera khan
Greenhorn

Joined: Jul 17, 2001
Posts: 2
I had the same problem when I used jdk1.2.2
When I compile with jdk1.3, I get the following error
java.sql.SQLException: Result set type is TYPE_FORWARD_ONLY
at sun.jdbc.odbc.JdbcOdbcResultSet.beforeFirst(JdbcOdbcResultSet.java:20
45)
plz help
thanks
Originally posted by Thomas Paul:
It means that the JDBC driver you are using does not support the operation. You may wish to try to find a better driver that more fully supports JDBC 2.0 functionality.

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
This discussion seems more appropriate for the JDBC forum. I'm moving this thread there.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

sabera:
1. You did not create a scrollable resultset upon statement creation then tried to use a method that can only be used on a scrollable resultset.
fix: Statement s = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
and if the above gives you a "feature not implemented" exception then read further.
2. the database driver you are using does not implement a scrollable resultset. So even though you specified that you wanted one in the statement creation, the driver ignored your request. Then when you try to use these features of scrollable resultsets, you get this error. You might want to update your driver or find a new driver that supports these features you want to use in your programs.
available drivers:
http://industry.java.sun.com/products/jdbc/drivers
odbc drivers in general do not support a lot of the JDBC 2.x features.

Jamie

[This message has been edited by Jamie Robertson (edited August 02, 2001).]
Suji N
Ranch Hand

Joined: Sep 04, 2001
Posts: 35
Respected Sir,
I am using sql server 2000 on windows 2000 and jdbc odbc drivers
i am getting the exception like..
java.lang.UnsupportedOperationException
how to solve the problem without using type-4 drivers
how to upgrade my jdbc odbc drivers to support my application
is there any way to upgrade my type - 1 drivers itself to get solution
pl mail me back
thankyou
yours
suji
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC-UnsupportedOperationException