无论如何,是否可以使用 TM1 API 连接到在 VBA 中使用 CAM 身份验证的服务器?
我根据此处找到的答案尝试了以下代码:
SystemServerCAMSecurityRequired error when authentication using Cognos
Dim credentials(1 To 3) As Long
credentials(1) = TM1ValString(hPool, Trim(CAMNamespace), 0)
credentials(2) = TM1ValString(hPool, Trim(ClientName), 0)
credentials(3) = TM1ValString(hPool, Trim(ClientPassword), 0)
vCredentials = TM1ValArray(hPool, credentials, 3)
hServer = TM1SystemServerConnectWithCAMNamespace(hPool, vServerName, vCredentials)
但是,这会导致 Excel 崩溃。
我知道我正在连接到正确的服务器,并且我知道用户名/密码是正确的,我知道我的计算机上也正确安装了 TM1 API。