--------------------------------------------------------------------------------
i have a connection problem (jdbc/As400), this is my code:
import java.io.*;
import java.sql.*;
import com.ibm.as400.access.*; // package tollbox for Java
//import com.ibm.db2.jdbc.app.*;
import gui.*;
public class ConnectionDb{
static Connection AScon;
static String hostname = new String("x.x.x.x"); // IP address per acccesso Remoto
// Se utente non č specificato verrā presentata automaticamente una finestra con la richiesta utente
static String user = new String("XXX"); // nome utente AS400 di default
static String pwrd = new String("XXX"); // password utente AS400
static AS400 ASname = new AS400(hostname);
/**
* Costruttore per accesso Remoto (richiamato per default)
*/
public static void main(String [] args){
// Apre connessione con AS400 se necessario
try {
System.out.println("2");
if ((AScon == null) || (AScon.isClosed())) { // se la connection č close >> open connessione
DriverManager.registerDriver(new AS400JDBCDriver()); // registro il driver
System.out.println("3");
AScon = DriverManager.getConnection("jdbc:as400://" + ASname, user, pwrd); // accesso remoto
}
new Application();
//AScon.close();
}catch (SQLException ex1) {
System.out.println ("SQLException : " + ex1.getMessage());
}
}
}
end this the error msg:
SQLException : The application requester cannot establish the connection.(AS400 (system name)
could you help me, i very tired!!!
byebye