Solution ID: prim23796 |
How to connect to the SDK through JDBC connection |
Status: Reviewed |
Version(s): 3.5.1, 4.0, 4.1, 5.0 |
Problem: | How to connect to the SDK through JDBC connection |
Fix: | To connect to the SDK via a JDBC connection, you will need to use the JDBC-ODBC bridge import java.sql.Connection; /***********************
// Set the Database URL to be jdbc:odbc:<<DSN NAME>>
try{ // Load the JDBCODBC driver included with 1.4.x JDK’s //Make a connection the the database URL, send username and password conn.close(); catch(java.lang.ClassNotFoundException e) { System.out.println(“SQL Driver not found “); } The integration API can also be used to connect Java applications to the PMDB. DISCLAIMER: The code listed above is provided for the convenience of the User and is not provided under warranty or supported as part of Primavera System Inc.’s Maintenance and Support Program. Users who implement the code do so at their own risk. Primavera Systems Inc. will not be responsible for any problems or data loss resulting from the use of this application. |