Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have QlikView Enterprise 8.20.5402.2 installed on my desktop. (I understand from other posts that QV9 doesnt support ODBC yet)
Added a User DSN in ODBC data sources. This data source points to a QlikView file.
Wrote below Java code to connect to this datasource and fetch data from a table (which is visible and maximized in QlikView document)
package com;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class QVOdbcTest {
public static void main(String[] args) {
try {
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ) ;
Connection conn = DriverManager.getConnection( "jdbc:odbc:ICV_GLOBAL" ) ;
Statement stmt = conn.createStatement() ;
ResultSet rs = stmt.executeQuery( "SELECT * FROM RegionTable" ) ;
while( rs.next() )
System.out.println( rs.getString(1) ) ;
rs.close() ;
stmt.close() ;
conn.close() ;
}catch(Exception e) {
e.printStackTrace();
}
}
}
Running this program throws an exception as below -
java.sql.SQLException: The result set type is not supported.
at sun.jdbc.odbc.JdbcOdbcStatement.initialize(JdbcOdbcStatement.java:154)
at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:422)
at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:396)
at com.QVOdbcTest.main(QVOdbcTest.java:13)
When I ran the program it opened QlikView Enterprise and I provided userid, password and opened the QlikView file.
Tried with System DSN but got same error..
Any thoughts on how to resolve this... thanks in advance!
Bump !