Connecting to databases while defining a Transformation Map using JDBC

LANSA Composer

Connecting to databases while defining a Transformation Map using JDBC

With MapForce 2012, you also have the alternative of creating connections via JDBC. It is important to note that this JDBC connection is only used inside MapForce and is not the same as the one that is used by LANSA Composer server at runtime.

To use JDBC, you will need the proper JDBC driver installed on your machine.

Finding the Right JDBC Driver

Depending on the database being used, you will need an appropriate JDBC driver. Please consult your system administrator to determine the appropriate driver to use.  For example, to connect to IBM DB2 for i5/OS, you would usually use the JDBC driver provided by IBM in the file jt400.jar.

Installing the JDBC Driver

To be able to use a JDBC driver, it must first be added to the java CLASSPATH. To do this:

1.  First put it somewhere on your system e.g. C:\Drivers.

2.  Then go to Control Panel -> Systems -> Advanced.

3.  Click on Environment Variables.

4.  Select the CLASSPATH variable and click edit.

5.  Add the location of the JDBC driver to the path.

6.  You may need to restart your PC for the setting to take effect.

Using JDBC in MapForce

To opt to use JDBC, first you need to click JDBC Connections on the 'Select a Database' dialogue. You will then be presented with a screen similar to the following. Enter the appropriate details and you should be able to connect to the database.

For example, if you are connecting to an IBM DB2 for i5/OS database and you are using the JDBC driver jt400.jar, you would be selecting the AS400JDBCDriver as below and you would probably use a connection string similar to: 'jdbc:as400://{server-name}'.