<pre name="code" class="java">String sql = "select * from test";

    //连接字符串,格式: "jdbc:数据库驱动名称:
    //数据库服务器ip:端口号/数据库名称:INFORMIXSERVER=服务器名;
    //user=用户名;password=密码"
    String url = "jdbc:informix-sqli://127.0.0.1:1533/testDB:
                  INFORMIXSERVER=myserver;user=testuser;password=testpassword";

    Class.forName("com.informix.jdbc.IfxDriver").newInstance();

    Connection conn = DriverManager.getConnection(url); 
    Statement  stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE
                                         , ResultSet.CONCUR_UPDATABLE);
    ResultSet  rs   = stmt.executeQuery(sql);

    rs.close();
    stmt.close();
    conn.close()