On 9/2/2014 4:48 PM, Graves, Chuck wrote:
Thanks for the reply. The jar file is OK, I see the classes as you said I would, the java source was copied (drag/drop) and re-compiled on the iSeries. All good. It runs but gives the "no suitable driver found for" and lists the connection parameters (connection string)... the same string works from my PC. Evan calling it with the -cp parameter (java -cp /java/jdbc/sqljdbc4.jar:. ibmiToSqlServer6) produces the same results

OK, can you paste the exact message you're getting? And perhaps the
source code? Here is a bit of working code from a proof of concept I
did. It ran fine on V5R4 as well as now on 7.2

import java.sql.*;
import java.util.Properties;

public class MSSQLtest {

private Connection connection = null;
public static void main(java.lang.String[] args) {

MSSQLtest test = new MSSQLtest();

public MSSQLtest() {

Properties properties = new Properties ();
properties.put("user", "uuuuuu");
properties.put("password", "pppppp");
properties.put("databaseName", "dddddd");

try {
connection =
System.out.println("DATABASE NAME IS:"
+ connection.getMetaData().getDatabaseProductName());

} catch (Exception e) {
System.out.println("Caught exception: " + e.getMessage());

public void runQuery() {
try {
Statement s = connection.createStatement();
ResultSet rs = s.executeQuery("select * from

int i = 0;
while (rs.next()) {
+ " " + rs.getString("column_name")
+ " " + rs.getString("data_type")
+ " " + rs.getString("character_maximum_length")
+ " " + rs.getString("numeric_precision")
+ " " + rs.getString("numeric_scale"));

System.out.println("There were " + i + " rows returned.");
System.out.println("Output is complete.");

} catch (SQLException e) {
System.out.println("SQLException exception: ");
System.out.println("Message:....." + e.getMessage());
System.out.println("SQLState:...." + e.getSQLState());
System.out.println("Vendor Code:." + e.getErrorCode());

public void cleanup() {
try {
if (connection != null)
} catch (Exception e) {
System.out.println("Caught exception: ");

I'm also using sqljdbc4.jar. In my case, it's in /java, along with this
code; that's where all of my Java code is stored. I don't have a lot of
it :-) My CLASSPATH is


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-2021 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.