This Essbase discussion board is provided as a free service and dedicated to all the Essbase professionals out there!
 

 Return to Index  

API calls XL2010 Win 7 ESB 11.1.2.0.0 B444

April 24 2012 at 4:43 PM
No score for this post
 
from IP address 209.243.55.104

 

I’m running some macros to connect to Essbase and retrieve data but I’m getting the following error messages with hCtx =0

Global Const ESB_API_VERSION = &H65600
Const aoiEssInitFailure = 10004
Declare Function EsbInit Lib "esbapin" (pInit As ESB_INIT_T, phInst As Long) As Long
Dim glhInst As Long

hCtx = EssVGetHctxFromSheet(wsFullName(strSheetName)) ' returns 0
status = EsbValidateHCtx(hCtx) ' message number 1030001

If status <> 0 Then
With oInit
.Version = ESB_API_VERSION ‘shows a version number 415232
.LocalPath = String$(ESB_PATHLEN, vbNullChar)
.MessageFile = String$(ESB_PATHLEN, vbNullChar)
.HelpFile = String$(ESB_PATHLEN, vbNullChar)
.MaxHandles = 10
.ClientError = ESB_TRUE
.ErrorStack = 100
End With

status = EsbInit(oInit, glhInst)

If glhInst = 0 Then Err.Raise aoiEssInitFailure, , "Could not initialize Essbase API."
''here I get the error message because glhInst =0

The first part of the code finds the Essbase path by finding Environ("ARBORPATH") and then registers the add-in

Application.RegisterXLL Filename:=MyAbPath & "\bin\ESSEXCLN.XLL"

I read an article about some conflict generated by the Ev Variables so I listed below all the ones related to Essbase, don’t know if makes any difference

Path= C:\Program Files (x86)\Microsoft Office\Office14\;
C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin;
C:\product\11.1.0\client_2;
C:\Oracle\product\11.2.0\client_1

ARBORPATH= C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient

ESSBASEPATH= C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient


Thank in advance

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Responses

  1. Re: API calls XL2010 Win 7 ESB 11.1.2.0.0 B444 - Tim Tow on Apr 25, 9:39 AM
    1. Re: API calls XL2010 Win 7 ESB 11.1.2.0.0 B444 - Luis G on Apr 25, 11:35 AM
      1. Re: API calls; pathing issue - Tim Tow on Apr 25, 2:03 PM
        1. API calls; pathing issue - Luis G on Apr 25, 3:30 PM
          1. Re: API calls; pathing issue - Tim Tow on Apr 25, 4:02 PM
            1. RE: API calls; pathing issue - Luis G on Apr 25, 4:34 PM
              1. Re: RE: API calls; pathing issue - Robb Salzmann on May 1, 10:17 AM
                1. API calls; pathing issue - Luis on May 24, 10:33 AM
     
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement  

RSS feed for this forum - http://www.network54.com/Forum/58296?xml=rss. Please email hypess (at) gmail.com, if you have any questions/feedback/issues.