Hi
I am writing simple jdbc code and try to connect the progress 10.1C database. The connection is not sucess and its giving error.
Code:
public
I am writing simple jdbc code and try to connect the progress 10.1C database. The connection is not sucess and its giving error.
Code:
public
class OpenEdge {
private java.sql.Connection con = null;
privatefinal String url = "jdbc:jdbcprogress:T:";
privatefinal String serverName= "mrcl";
privatefinal String portNumber = "5566";
privatefinal String databaseName= "sampledb";
privatefinal String userName = "hello";
privatefinal String password = "helloadmin";
privatefinal String serverName= "mrcl";
privatefinal String portNumber = "5566";
privatefinal String databaseName= "sampledb";
privatefinal String userName = "hello";
privatefinal String password = "helloadmin";
// Constructor
public OpenEdge(){}
private String getConnectionUrl(){
returnurl+serverName+":"+portNumber+":"+databaseName; }
private java.sql.Connection getConnection(){
try{
Class.forName("com.progress.sql.jdbc.JdbcProgressDriver");
System.out.println("connection url :" +getConnectionUrl());
con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
}
returncon;
}
con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
}
returncon;
}
publicstaticvoid main(String[] args) throws Exception
{
OpenEdge myDbTest = new OpenEdge();
myDbTest.getConnection();
OpenEdge myDbTest = new OpenEdge();
myDbTest.getConnection();
}
}
ERROR is:
Error Trace in getConnection() : No suitable driver found for jdbc:jdbcprogress:T:mrcl:5566:sampledb
But instead of the above url and driver, if i used url=
"jdbc:datadirectpenedge://" and driver is
com.ddtek.jdbc.openedge.OpenEdgeDriver then i can able to connect it.
"jdbc:datadirectpenedge://" and driver is
com.ddtek.jdbc.openedge.OpenEdgeDriver then i can able to connect it.
Questions:
-------------
1) Can u please tell me what is the reason for this error?
2) Whether i can use com.progress.sql.jdbc.JdbcProgressDriver for Openedge 10.1C database or not?
3) Is there is any difference between
com.progress.sql.jdbc.JdbcProgressDriver and
com.ddtek.jdbc.openedge.OpenEdgeDriver drivers?
4) In which version of progress database we have to use these above two drivers?
-------------
1) Can u please tell me what is the reason for this error?
2) Whether i can use com.progress.sql.jdbc.JdbcProgressDriver for Openedge 10.1C database or not?
3) Is there is any difference between
com.progress.sql.jdbc.JdbcProgressDriver and
com.ddtek.jdbc.openedge.OpenEdgeDriver drivers?
4) In which version of progress database we have to use these above two drivers?
Thanks
mindus
mindus