我在REDHAT上建JSP,用TOMCAT,INFORMIX 数据库建要另外一台机RS/6000上,我用INFORMIX自带
的JDBC2.0建立连接,不知为什么就是连不上,
import java.io.*;
import java.sql.*;
public class Informix
{
public static void main (String args[])
{
String userName = "test12";
String mypassword = "test12";
String url = "jdbc:informix-sqli://56.9.117.31:9005:INFORMIXSERVER=aix_net;user=userName;password=mypassword";
try
{
Class.forName("com.ddtek.jdbc.informix.InformixDriver");
System.out.println("ok!");
Connection con=DriverManager.getConnection(url);
if(con!=null) System.out.println("Connection Successful!");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}