I have managed to get it to compile and run (with help from http://forums.olapforums.com/viewtopic. ... 56&start=0).
I get an error 87: SystemServerNotFound, when i run it though.
Code: Select all
TM1APIInitialize();
hUser = TM1SystemOpen();
TM1SystemAdminHostSet(hUser, "SERVERNAME");
hPool = TM1ValPoolCreate(hUser);
strServerName = "tm1 server";
vServerName = TM1ValString(hPool, strServerName.Trim(), 0);
hServer = TM1SystemServerConnectIntegratedLogin(hPool, vServerName);
if (TM1ValType(hUser, hServer) == TM1ValTypeObject())
{
Console.WriteLine("Success");
}
if (TM1ValType(hUser, hServer) == TM1ValTypeError())
{
int nErrCode = TM1ValErrorCode(hUser, hServer);
string szErrMsg = TM1ValErrorString(hUser, hServer);
Console.WriteLine(nErrCode + ": " + szErrMsg);
}
TM1APIFinalize();
Is there something that I am missing?
Thanks in advance.