| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

J2EE access to the iSeries database

Page history last edited by PBworks 15 years, 9 months ago

 

VCard JSP

SelectDBBean Java code

SelectHTMLResults JSP

 

This example demonstrates a general purpose setup that runs a SQL statement & then displays it in a grid.

 

This application uses the DB2 native JDBC driver via a J2EE datasource (running in Tomcat on an iSeries):

 

 

  <ResourceParams name="jdbc/OneCall">

    <parameter>

     <name>user</name>

     <value>maxdw</value>

    </parameter>

    <parameter>

     <name>password</name>

     <value>maxdw1</value>

    </parameter>

    <parameter>

       <name>driverClassName</name>

       <value>com.ibm.db2.jdbc.app.DB2Driver</value>

    </parameter>

    <parameter>

      <name>driverName</name>

      <value>jdbc:db2:cat32;translate binary=true</value>

    </parameter>

  </ResourceParams>

 

 

Note the translate binary=true parameter on the jdbc URL. This ensures that database tables (physical files) with CCSID 65535 get their character data translated to ASCII on delivery to the Java program.

Comments (0)

You don't have permission to comment on this page.