Results 1 to 2 of 2

Thread: JDBC iSeries

  1. #1
    Join Date
    Jan 2008
    Posts
    4
    Rep Power
    0

    Default JDBC iSeries

    If I am trying to connect to as AS/400(iSeries) using JDBC in an applet, is this how the code should look to just establish the connection?

    Java Code:
    public static java.sql.Connection opnAS400Conn() throws Exception
    {
         String url = "domainName";
         String userName = "my400UserName";
         String password = "my400Password";
         String libraryName = "my400LibraryName"; //This should be the library 
              where the datafile resides, right?
    
         java.sql.Connection cn = null;
         Class.forName("com.ibm.as400.access.AS400JDBCDriver");
         cn = DriverManager.getConnection("jdbc:as400:" + url + "; translate 
         binary=true; naming=system; " + "extended metadata=true;libraries=" + 
         libraryName + "; date format=iso",userName,password);
         return cn;
    }

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Replies: 0
    Last Post: 04-01-2008, 10:17 AM
  2. Jdbc
    By siwa in forum JDBC
    Replies: 4
    Last Post: 11-09-2007, 07:31 AM
  3. Replies: 0
    Last Post: 09-28-2007, 12:56 PM
  4. Ha-jdbc 2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-17-2007, 05:40 PM
  5. Help with JDBC
    By Eric in forum JDBC
    Replies: 2
    Last Post: 06-28-2007, 06:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •