|
ODBC is a Microsoft Windows technology and doesn't run on the 400. So if you want your Java program on the 400 to be able to use an Access database, you'll need to get a database driver that can do that. Here's a link to a page where you can search for JDBC drivers: http://industry.java.sun.com/products/jdbc/drivers You'll need a pure Java driver, of course, no Windows DLLs or anything like that. That's driver type 3 or 4. Hope this helps PC2 -----Original Message----- From: Richard Casey [mailto:casey_r@popmail.firn.edu] Sent: December 24, 2002 08:51 To: Java-400 List (E-mail) Subject: Using ODBC driver from AS/400 Hi! I've written a Java program to read information from a Microsoft Access database, "massage" it a bit, and load it into an AS/400 database. I'm using the JDBC-ODBC driver to read the Access database along with a tip I picked up on how to build the DSN on the fly. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); Connection con = DriverManager.getConnection( "jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=" + accessFilename,"",""); This works fine when I run it from my PC. I would like to be able to run it on the AS/400 by putting the Access database file on the IFS and running the program in the QSH environment. The program compiles fine, but I get a "No suitable driver" SQLException when I try the getConnection against the Access database. Am I out of luck or am I just missing something (classpath perhaps)? Thanks in advance for any assistance!
As an Amazon Associate we earn from qualifying purchases.
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.