Kbase 21246: What are the steps to configure JDBC driver on OpenEdge 10.1A or later
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/1/2010 |
|
Status: Verified
GOAL:
Where are the JDBC drivers in OpenEdge?
GOAL:
Where can I find the JDBC drivers for OpenEdge on Windows?
GOAL:
Where can I find the JDBC drivers for OpenEdge on Unix?
GOAL:
What are the steps to configure JDBC driver on OpenEdge 10.1A and later?
GOAL:
How do I setup OpenEdge 10.1A or later JDBC environment?
GOAL:
What are the JDBC Components for OpenEdge 10.1A or later?
GOAL:
What are the Type 4 Progress JDBC driver Components?
GOAL:
What files are required for JDBC in OpenEdge?
FACT(s) (Environment):
OpenEdge 10.1x
All Supported Operating Systems
FIX:
Starting on OpenEdge 10.1A the JDBC driver is a Type 4 JDBC driver.
The following are OpenEdge 10.1A up until 10.2A JDBC components are:
On Windows:
%DLC%\java\openedge.jar #Progress OpenEdge Driver and DataSource classes
%DLC%\java\util.jar #Classes that are used by and required by the Progress OpenEdge driver
%DLC%\java\base.jar #Classes that are used by and required by the Progress OpenEdge driver
%DLC%\java\pool.jar #DataDirect Connection Pool Manager classes
%DLC%\java\spy.jar
On UNIX including Sun Solaris SPARC (32 bit and 64 bit) , Compaq Tru64 UNIX , Linux X86, IBM AIX, HP-UX (32 bit and 64 bit)
$DLC/java/openedge.jar #Progress OpenEdge Driver and DataSource classes
$DLC/java/util.jar #Classes that are used by and required by the Progress OpenEdge driver
$DLC/java/base.jar #Classes that are used by and required by the Progress OpenEdge driver
$DLC/java/pool.jar #DataDirect Connection Pool Manager classes
$DLC/java/spy.jar
With 10.2B, the util.jar, base.jar,a nd spy.jar are not longer components.
1) The first step to configure the JDBC driver is to set CLASSPATH.
CLASSPATH=$DLC/java/openedge.jar: $DLC/java/util.jar: $DLC/java/base.jar:$CLASSPATH
On Windows you might need to set CLASSPATH within the environment of your Java client.
2) To load the driver, make sure that the application loads the class "com.ddtek.jdbc.openedge.OpenEdgeDriver". For example, add the java call:
Class.forName( "com.ddtek.jdbc.openedge.OpenEdgeDriver");
3) To establish a connection, the following is a sample of the connection string:
Connection con = DriverManager.getConnection ( url );
String url;
url = new String ( "jdbc:datadirect:openedge://myhost:6718;databaseName=sports2000;user = jones;password = secret" );
Or you can also use:
Connection con = DriverManager.getConnection ( url );
jdbc:datadirect:openedge://host:port;databaseName=db_name;
servicename=service_name;
defaultSchema=schema_name;
statementCacheSize=CacheSize;