I think that's PentaSafe...

On 3/15/07, Sivakumar Kanagavel <srkas400@xxxxxxxxx> wrote:
I am trying to learn Java and how to access AS/400 data using JDBC and wrote a 
small program :

  import java.sql.*;
public class MyDBRead{
public static void main (String argv []){
  try {
  String sys = "TESTSYS1";
  String user = "SIVAKUMARK";
  String pass = "TEXAS1";
  Connection con =  DriverManager.getConnection("jdbc:as400://"+sys,user,pass);
  Statement stm = con.createStatement();
  ResultSet rs = stm.executeQuery("select FIELD1 from MYFILE");
  while(rs.next())  {
    System.out.println(rs.getString(1)); }
 con.close();   }
 catch(Exception e) {
  e.printStackTrace();  }
 }      }

  The code compiled without any error. While trying to execute, its throwing 
following exceptions. Can someone tell what I am missing here?. Thanks for in 

  java.sql.SQLException: [PWS9801] Function rejected by user exit program 
      java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:85)
      java/lang/Exception.<init>(Ljava/lang/String;)V+1 (Exception.java:33)
400JDBCConnection;III)V+0 (JDError.java:388)
cess/JDSQLStatement;)Lcom/ibm/as400/access/JDServerRow;+0 (AS400JDBCStatement
)Ljava/sql/ResultSet;+0 (AS400JDBCStatement.java:1355)
      MyDBRead.main([Ljava/lang/String;)V+0 (MyDBRead.java:7)

Looking for earth-friendly autos?
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.