OLAP connection types

There are two types of OLAP connections: internal or farm connections and external connections. Farm connections are connections to an OLAP that is running within a farm. External connections are XMLA connections. To connect to an OLAP instance within a farm, you must first connect the Application Engine to the farm. Then use one of the three forms of the OLAPCreateConnection function.
Caution: 
This function is deprecated. Use OLAPCreateNamedConnection() instead.

Each OLAPCreateConnection function requires the name of the database and the authentication data:

  • OLAPCreateConnection(string connectionString): The parameter connectionString must be a database connection string that includes the database token, user and password tokens, or a ticket token.
  • OLAPCreateConnection(string database, string user, string password)
  • OLAPCreateConnection(string database, string ticket)

Each OLAP farm database must have a unique name. Because Infor EPM services manage the security of the farm internally, it is not required to set the secured option for an OLAP connection. Depending on the security settings of the farm, an OLAP Service manager returns either HTTP or HTTPS URLs for the registered databases. Application Engine selects the URL from those that are returned by the OLAP Service manager and does not check the protocol.

#define EngineVersion 3.0
#define RuntimeVersion 3.0

//#define EngineVersion 4.0
//#define RuntimeVersion 4.0

//#define EngineVersion 5.0
//#define RuntimeVersion 5.0

//#define EngineVersion 6.0
//#define RuntimeVersion 6.0

void GetCubes()
@Description: "Describe your process here";
@Category: "Place your process category here";
@Returns: "Place the return value description here";
 {
     OLAPConnection conn = OLAPCreateConnection("user=Admin; password=infor; database=Application Engine");
     OLAPConnection conn1 = OLAPCreateConnection("Application Engine", "rfPC2MAc74flEl35RpvrksWdjdkcd0Uy2SFxipm9JPYadpD+SrRVnzl==");
     OLAPConnection conn2 = OLAPCreateConnection("Application Engine", "admin", "infor");
     OLAPConnection conn3 = OLAPCreateConnection("database=Application Engine; ticket=rfPC2MAc74flEl35RpvrksWdjdkcd0Uy2SFxipm9JPYadpD+SrRVnzl==");

     WriteLine("connection string");
     OLAPCubeList cbs = OLAPGetCubeList(conn);
     foreach(OLAPCube c in cbs) {
         WriteLine(OLAPGetCubeName(c));
     }
     WriteLine("ticket");
     cbs = OLAPGetCubeList(conn1);
     foreach(OLAPCube c in cbs) {
         WriteLine(OLAPGetCubeName(c));
     }
     WriteLine("usr/pwd");
     cbs = OLAPGetCubeList(conn2);
     foreach(OLAPCube c in cbs) {
         WriteLine(OLAPGetCubeName(c));
     }
     WriteLine("csTicket");
     cbs = OLAPGetCubeList(conn3);
     foreach(OLAPCube c in cbs) {
         WriteLine(OLAPGetCubeName(c));
     }
     OLAPDisconnect(conn);
 }