- 论坛徽章:
- 0
|
现在我这边的问题 又升级了 !
加了代码,进行调试,但是仍然不行.以下是代码:
package informix_lan;
import java.sql.*;
public class informixJDBCtest {
public static void main(String agrs[]){
String driver="com.informix.jdbc.IfxDriver";
String url="jdbc:informix-sqli://192.168.20.12:5000/cms:informixserver=cms_ol;user=CMS;password=dadmin01";
try{
Class.forName(driver);
}
catch(Exception E) {
System.out.println("无法加载驱动程序"+driver);
E.printStackTrace();
}
try
{ System.out.println("222222");
Connection con=DriverManager.getConnection(url);
System.out.println("9999");
if(!con.isClosed())
System.out.println("打开数据库成功");
con.close();
}
catch(SQLException SE)
{
System.out.println("打开数据库失败");
SE.printStackTrace();
}
}
}
这个完了后,Eclipse不报任何错,没有任何记录,不知道为什么?
帮忙看看为什么....
如果我改成:String url="jdbc:informix-sqli://192.168.20.12:5000/cms_ol:user=CMS;password=dadmin01";
它就会报这段的错,弄的我们左右为难...... |
|