2

I am trying to connect OLAP cube server from SSIS using script task(C# .net). I am getting following error

"Value cannot be null".

I am using the SSDT 2017.

The same was working from BIDS 2008. But not working on the SSDT 2017.

Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server();
server.Connect("localhost");

Error Message : Value cannot be null. Inner Exception : null

Hadi
  • 36,233
  • 13
  • 65
  • 124

1 Answers1

0

Try replacing localhost with the DataSource=localhost.

Example:

Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server();
server.Connect(@"DataSource=localhost");

References


I suggest refering to te following article for a step by step guide to connect to SSAS multidimensional database from Script Task:

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • I think the second part is the OP need +1 – Yahfoufi Jun 26 '19 at 07:58
  • Replacing localhost with "DataSource=localhost" does not work for me. I had already tried giving complete connection string and well as you said in the above. But not working. somehow in the same machine with 2008 SSIS it was working. i am able to connect. – kabilan Mohanasundaram Jul 03 '19 at 08:08