protected void setUp() throws SQLException {

    Olap4ldUtil.prepareLogging();

    Olap4ldUtil._isDebug = false;

    connection = tester.createConnection();
    connection.getCatalog();
    olapConnection = tester.getWrapper().unwrap(connection, OlapConnection.class);
    olapConnection.getMetaData();

    // Create a statement based upon the object model.
    // One can simply keep open the statement and issue new queries.
    OlapConnection olapconnection = (OlapConnection) connection;
    this.stmt = null;
    try {
      stmt = olapconnection.createStatement();
    } catch (OlapException e) {
      System.out.println("Validation failed: " + e);
      return;
    }
  }
Esempio n. 2
0
 public static CellSet getResultSet(String mdx, OlapConnection conn) throws OlapException {
   OlapStatement statement = conn.createStatement();
   CellSet cellSet = statement.executeOlapQuery(mdx);
   return cellSet;
 }