Page 1 of 1

ADOMD ActiveConnection stopped working...

Posted: Wed Aug 01, 2012 2:14 am
by GPC
Hi All,

Environment: Server & Client both TM1 9.5.1, Excel 2007.

We have a report which uses ADOMD & MDX to retrieve values from a cube with this VBA code;

Code: Select all

Set cat = CreateObject("ADOMD.Catalog")
Set cst = CreateObject("ADOMD.CellSet")
<Set String Variable Values>
strConnection = "Provider=TM1OLAP;Location=" & strTM1AdminServer & ";Data Source=" & strTM1Server & ";User ID=" & strUser & ";Password=" & strPassword & ";"
cat.ActiveConnection = strConnection
cst.Source = strMDX
Set cst.ActiveConnection = cat.ActiveConnection
cst.Open
<retrieve some data>
cst.Close
Set cat = Nothing
Set cst = Nothing
The code above is called repeatedly from a loop.
The report has been used for many years with no problems.

Now here's the problem;

We have just upgraded the Server from Windows 2003 Server to Windows 2008 Server and adjusted the TM1AdminServer Name accordingly.
Now what happens is that the code above runs successfully for a variable number of times, then throws up either one of 2 errors on the
cat.ActiveConnection = strConnection
line. (Screenshots in the attachment). If we Debug, then Continue it happlily continues for a variable number of times & then stops again.
So it seems like a timing issue or something different between Windows Server 2003 & 2007 but as yet I've been unable to find any information on what to look for.
Any ideas or thoughts would be greatly appreciated.

Thanks,

Gregory

Re: ADOMD ActiveConnection stopped working...

Posted: Thu Aug 09, 2012 4:46 am
by GPC
OK, we discovered the cause;

The new server had IPv6 selected in the Network Adapter settings. Once we turned it off & allowed it to use IPv4 it worked again.

Cheers,

Gregory