API calls XL2010 Win 7 ESB 11.1.2.0.0 B444

API calls XL2010 Win 7 ESB 11.1.2.0.0 B444

Luis G
Luis G

April 24th, 2012, 8:43 pm #1

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
Quote
Share

Tim Tow
Tim Tow

April 25th, 2012, 1:39 pm #2

Hi Luis,

I believe you may be missing something in your path. There is a new directory that needs to be included in the path. That directory, on my system, is located at C:\Oracle\Middleware\EPMSystem11R1\bin-32. Here is a blog post on how I got the classic add-in, and the Outline Extractor, working on my Win7 64-bit machine that also has the 64-bit Essbase server running on it:

http://timtows-hyperion-blog.blogspot.c ... or-on.html.

Take a look and let us know if that resolves your issue. BTW, once you get this in place and if you are connected to Essbase in the classic add-in, the EssVGetHctxFromSheet call should properly return a context handle and you should not need to initialize the API yourself.

Tim

Tim Tow
Oracle ACE Director
Applied OLAP, Inc

Quote
Share

Luis G
Luis G

April 25th, 2012, 3:35 pm #3

Tim, thanks a lot for the quick response.

The bin-32 doesn't exist for any Oracle related folder

in C:\Oracle\Middleware\EPMSystem11R1\ I have common\ and products\ and the is not bin-32 folder under any of them.

I found this folder but is not there either
C:\Oracle\product\11.2.0\client_1

Thanks again for your help,

Luis G


Quote
Share

Tim Tow
Tim Tow

April 25th, 2012, 6:03 pm #4


Does the \client_1 directory contain the Essbase API runtime files including esbapin.dll?

BTW, they have been evolving the directory structure in these last few versions and, as a result, in my opintion it has made it very hard to work with the Essbase VB API.

Tim Tow
Oracle ACE Director
Applied OLAP, Inc
Quote
Share

Luis G
Luis G

April 25th, 2012, 7:30 pm #5

Thanks again Tim,
I found it in here

C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin
Quote
Share

Tim Tow
Tim Tow

April 25th, 2012, 8:02 pm #6


The question is this.. Does that directory contain the 64-bit or the 32-bit Essbase client?

On my 64-bit Win7 laptop, I have both the 64-bit and 32-bit Essbase 11.1.2.1.102 components installed.. My directories include:

C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient
C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient-32
C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer
C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer-32

The 'Client \bin' directories in 11.1.2.1.102 do not contain any dlls; they have moved them elsewhere.

Tim

Tim Tow
Oracle ACE Director
Applied OLAP, Inc
Quote
Share

Luis G
Luis G

April 25th, 2012, 8:34 pm #7

Tim,

I only have EssbaseClient

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

I don't see a EssbaseServer or any ending with "-32"
Quote
Share

Joined: September 18th, 2008, 7:30 pm

May 1st, 2012, 2:17 pm #8

Tim, Luis,

I wonder if the -32 directories only exist on a server install, and are (mistakenly?) omitted on a purely client install.

That said; Luis, do these directories appear on your server? If so, maybe copy them to your client environment.

Regards,
Robb Salzmann
Quote
Like
Share

Luis
Luis

May 24th, 2012, 2:33 pm #9

Rob/Tim,

Thanks for your help.

I ended up changing the EsbAutoLogin function (dependant of EsbInit) for EssVConnect

Quote
Share


Confirmation of reply: