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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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:
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.


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.

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 156
jboss wildfly 10.1 10 579
passing enum to a method 4 47
Pass multiple values or string arrays in java as a parameter 3 72
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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

738 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