A driver that supports jdbc2.0

Posted on 2000-02-29
Last Modified: 2012-06-21
we're using the features of jdbc2.0 (such as moveToInsertRow,updateX,insertRow) and we get the following exception:

java.lang.UnsupportedOperationException at sun.jdbc.odbc.JdbcOdbcResultSet.moveToInsertRow( at JConnection.main(
Exception in thread "main" Process Exit...

Is there a driver that supports jdbc2.0 (free)
or we have to buy one (which)?
Question by:twg

Expert Comment

ID: 2568435
What database are you using?
LVL 16

Expert Comment

ID: 2569361

Expert Comment

ID: 2571617
If its for Oracle, they have several free ones at:

Author Comment

ID: 2571640
I'm using access databases and databases which are on the as/400 system (using client access).
Can you recommend me of a driver that supports jdbc2.0?
Isn't it possible to download a driver from somewhere (like the one which is supplied with the sdk for jdbc1.2?)

Expert Comment

ID: 2571668
Unless I am mistaken (which is likley since I do very little work on that platform), Visual Age for Java  V. 3  Enterprise edition has a class 3 JDBC (ODBC 2 compliant) driver for the AS/400. If not, why not use Toolkit 400? Aldo, I would think that VA for C++ should cary an ODBC 2 compliant AS400 driver.

You could ask IBM tech support for those particular details.

As far as Access, I have not purchased Office 2000 Pro but would assume that it would contain ODBC 2 drivers for access at this stage in the game. Check out their pages.

If you allready have earlier versions of their software (Office/Visual Studio) and VA for Java/C++,  you can usualy upgrade the drivers at no cost.
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.


Author Comment

ID: 2571704
Hi jpk,
I'm not sure I understood your answer.
I used up to now the jdbc-odbc bridge (of sun) which supports the jdbc1.2 and I'm looking for something similar for jdbc2.0.

Expert Comment

ID: 2573665
There are several types of JDBC drivers. Type 1 drivers use the odbc bridge.

Type 2 drivers are similar to odbc but use pure java to access the DB.

Type 3 drivers use RMI to access the DB, which means that the drivers have 2 components one for the client and one for the server.

Type 4 drivers (like Toolkit 400 and Oracles thin layer) access the DB nativley.

What this means is that the ODBC driver is a solution that you look for only if there are no better JDBC solutions available.

IBM has both a type 3 and a type 4 JDBC driver available for the AS400 though the type 3 requires QSHELL and QSHELL utilites to work.

Microsoft uses ODBC, ADO and/or DAO fo ACCESS. Since JDBC is only compatible with ODBC you would need such a driver there.

Author Comment

ID: 2575523
Hi jpk,
using the jdbc-odbc bridge, I could access all types of databases (including db on as/400 -with 'client access') so therefore I'm looking for something similar. What do you recommend me to do if I want to use the jdbc2.0 features?

Accepted Solution

gageot earned 30 total points
ID: 2575674
The sun JDBC-ODBC bridge bundled with JDK 1.3RC1 is JDBC2.0 compliant

Expert Comment

ID: 2578304
Straight jdbc drivers (levels 2, 3 and 4) on the other hand, can be downloaded from the net to the client box (as in the case of applets) thus avoiding the issues of client side install and configuration.

Level 2 and 3 jdbc drivers are totaly portable across both platforms and architectures that support Java (level 4 drivers are db dependant so cannot port to other databases).

An additional, and serious, problem with ODBC is that evry time you install a product that contains a diffrent version of ODBC than the one you were working with, a whole lot of applications break. So tech support staffs have to spend a large ammount of time reconfiguring end user boxes.

So the only really valid reason for using odbc and the jdbc odbc bridge is when there are no straight jdbc drivers available.

This is not your case.

For the AS400, SQL400 there are several alternative solutions at the typel 3 and 4 jdbc driver level, both with and without client access so I would say that,at least as far as the AS400 is concerned, your best option is probably Visual Age for Java.

On the access end, on the other hand, the option is not as clear cut. There are several jdbc level 2 and 3 drivers available, see:

for a list of available driver (which also include some for the AS400).

As well as Microosofts odbc driver thats bundled with both Visual studio and Office Pro.

So the answer to what to use depends on wether you will be writting your db access code in pure java or if you will also be using VB, VC++ and/or other languages.

The bridge was written as Java's first entry into accessing databases, intended to allow java programmers to start writting db applications inmediatley, while the market produced straight java jdbc drivers.

That stage is over, the bridge has not been deprecated because of backwards compatibility and because there are still a few databases that are not supported by straight jdbc drivers.

All told, I would check the features of the available straight jdbc drivers. If they have what you need then use them. Performance will be better and portability won´t be an issue. If none of the these drivers meet your needs, only then would I begin a search for odbc drivers.


Author Comment

ID: 2587110
I want to give the points to jpk but the problem is that his answers were in the comment textfields.
Is it possible to pass him the points?

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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 …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

747 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

11 Experts available now in Live!

Get 1:1 Help Now