Connectig with JDBC drivers

SED

New Member
Thanks for the suggestion, I have been breaking the problem down into workable parts so I took your suggestion and started with the database.

Step One-
I am trying to access a virtual server that holds the database. I went into the file folders to confirm that the jdbc drivers were installed and they were. I went to the Environment Variables and entered;

Created a CLASSPATH
%DLC%\java\jdbc.jar;

Set Path
%DLC%\bin;

Step Two-
I did the same on my computer;

Created a CLASSPATH
%DLC%\java\jdbc.jar;

Set Path
%DLC%\bin;

Step Three-
I used a java program to try and connect to the database from my computer using this program;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;

public class JDBCDriverInformation {
static String userid="sysprogress", password = "*****";
static String url = "jdbc:jdbcprogress:T:@@@@:&&&"; static Connection con = null;
public static void main(String[] args) throws Exception {
Connection con = getProgressJDBCConnection();
if(con!= null){
System.out.println("Got Connection.");
DatabaseMetaData meta = con.getMetaData();
System.out.println("Driver Name : " + meta.getDriverName());
System.out.println("Driver Version : " + meta.getDriverVersion());

}else{
System.out.println("Could not Get Connection");
}
}

public static Connection getProgressJDBCConnection(){

try {
Class.forName("com.progress.sql.jdbc.JdbcProgressDrive"); } catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try {
con = DriverManager.getConnection(url, userid, password);
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}

return con;
}

}


I get this error;

ClassNotFoundException: com.progress.sql.jdbc.JdbcProgressDrive
SQLException: No suitable driver found for jdbc:jdbcprogress:T:@@@@:&&&
Could not Get Connection


I’m at a lose to were to go from here is their anyone how has seen this or knows what might be wrong.
 
Hi.

first the driver name is missing a "r" at the end.

it should be: com.progress.sql.jdbc.JdbcProgressDriver

also try adding the progress.jar to the CLASSPATH,

SET PATH=%PATH%;%DLC%\bin
SET CLASSPATH=%CLASSPATH%;%DLC%\java\progress.jar;%DLC%\java\jdbc.jar
 
Back
Top