× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: JDBC 2.0 and OS400 V4R4
  • From: cujo@xxxxxxxxxx
  • Date: Wed, 11 Oct 2000 10:33:52 -0500

FYI:  The comments in Dave's note below apply to the Native JDBC driver as
well.  You simply have to cast your objects to the
Native JDBC types.

For example:

DB2Connection connection = (DB2Connection)
DriverManager.getConnection("jdbc:db2:*local");
DB2Statement statement = (DB2Statement) connection.createStatement();

etc...

While it is true that this is not portable anymore, if you need the
functionality and have the JDK 1.1.x requirement, it isn't such
a bad choice.  When your can drop the 1.1.x requirement in the future, it
is a fairly easy search and replace task to get the
code back to being portable.

BTW:  JDBC 3.0 is coming in JDK 1.4 and we can start all over again. :-)

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"TRUE! nervous, very, very dreadfully nervous I had been and am; but why
WILL you say that I am mad?
The disease had sharpened my senses, not destroyed, not dulled them. "

- Edgar Allan Poe
"The Tell-Tale Heart"




Dave Wall/Rochester/IBM@IBMUS@midrange.com on 10/11/2000 09:13:34 AM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   JAVA400-L@midrange.com
cc:
Subject:  Re: JDBC 2.0 and OS400 V4R4



You cannot easily call JDBC 2.0 methods from any 1.1.x JVM because Java is
defining and enforcing the interface, not the native JDBC driver or the
Toolbox JDBC driver.

The Toolbox implements both JDBC 1.x and JDBC 2.x methods in the same
class.  That does not mean all methods usable in all cases.  In your case,
you cannot call the JDBC 2.x methods from your 1.1.x JVM.  That is because
the interface the Toolbox implements is part of the JVM.  When you create a
JDBC object (connection, statement, result set, ...), you get a Toolbox
object that implements a Java interface.  If you try to call a method that
is not in the interface, it will fail.  So, if you try to call a 2.0 method
in a 1.1.x JVM, the call will fail because the interface (which is part of
the JVM) doesn't contain the method.

In theory you can get around this in the Toolbox case but it is not
recommended.  Instead of using the generic JDBC object you could cast your
object to be a specific Toolbox object.  For example, you could cast your
object to be an AS400JDBCStatement instead of a generic Statement object.
Now you can call all methods on that class.  This is not recommended
because you are no longer portable.  You must run with the Toolbox JDBC
driver.

What the Toolbox is really trying to do is make it easier to deploy your
application.  You don't have to worry about getting a different Toolbox jar
depending on the level of JVM / JDBC you are using.  You don't have to get
"Toolbox 1.x" when running in JVM 1.1.x, then upgrade to "Toolbox 2.x" if
you go to Java 2.  The same jar file will work for both.  It is true that
in the 1.1.x case the Toolbox objects will have extra methods that cannot
be called, but this little bit of size is worth the simplicity of having
only one jar file.

David Wall
AS/400 Toolbox for Java


fabrizio.zanardo@notes.electrolux.ie@midrange.com on 10/11/2000 03:28:15 AM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   JAVA400-L@midrange.com
cc:
Subject:  JDBC 2.0 and OS400 V4R4



Hi folks,
Can I use JDBC V 2.0 Classes with OS400 V4R4 and JDK 1.1.7 ?
If not what should I do to be able to use JDBC 2.0 with V4R4 (Toolbox
claims so ...) ?
Any suggestion would be most appreciated!
TIA,
Fabrizio

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.