Step 7. Set up the Database Configuration
LIC003 - Create a Transformation Map
When the
is used within a , it will be executed on your server. It will use the generated jar file and this will use JDBC to connect to the database tables you have used within your . To enable this connection to execute you need to specify a database connection string for use by JDBC. This is done by creating a1. In the
, expand and select .2. Select
on tool bar or right click and select from the context menu.a. Enter a iiiTUTDBID (where iii is your initials).
-b. Enter a Fred Smith Tutorial database configuration.
- such asc. Set the
to .3. Enter a
.A connection string for an IBM i server known as MYSERVER would be:
jdbc:as400://MYSERVER/MYLIB;naming=sql;errors=full;
date format=iso;
translate binary=true
where
is the name of the IBM i server and is the name of the library containing the database tables you wish to access.The following alternate form for the connection string permits database tables from more than one library (or schema) to be used. The JDBC connection property naming=system must be specified for this to be effective:
jdbc:as400://SYSNAME;naming=system;libraries=LIB1, LIB2,*LIBL;errors=full;date format=iso; translate binary=true The tutorial database tables can be found in the library for the LANSA partition in which LANSA Composer was installed - for example, LICLICLIB.
The connection string for the Microsoft Access database on a Windows server would be similar to this:
jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\Composer\Tutorial\Tutorial.mdb
4. Enter a
.For an IBM i server this would usually be
com.ibm.as400.access.AS400JDBCDriver
For a Windows server this would usually be
sun.jdbc.odbc.JdbcOdbcDriver
Refer to
and supplied example database configurations for more information and examples of JDBC connection strings and driver classes for common databases.5. Enter a
and . This must be a valid user on your server which has authority to the tables you are using within your map. (When using the Microsoft Access database on a Windows server, the database user and password should not be necessary.)Your systems administrator will be able to provide a User ID and Password.
6. Set
Set to
Your Database Configuration should now look similar to the following:
The necessary settings for these fields depends on options used in the
definition and in the JDBC connection string and on the JDBC driver implementation but these are usually the correct values when accessing the database tables on IBM i using the IBM-supplied JDBC driver.7.
your database configuration.