Friday, March 23, 2012

How to connect MS AS 2005 with AMO in vb.net

Hi All,

I am working on MSAS 2005 and am new to this one but i worked on AS 2000(DSO).I just want to connect to the MS AS 2005 Server from vb.net by using AMO(Analysis Management Object).

It is really very urgent.Help needed.

Regards

vishu

Hi,

MSDN has some great examples over here Those should get you started..

C.
|||

I tried with that.But i am getting below error.

connection cannot be made.Ensure that the server is running.

What could be the problem i could not understand.I checked in my services all the services are running and i able to connect from MS Management Studio to Analysis services.I am giving my Machine Name(ServerName)/SQL2005.

But when i am trying to connect from VB.Net am getting error.

Please help on this.

Regards

vishu

|||It may help to paste your code.

C
|||

Hi

I am Placing that part of code.Please check it and let me know.

using System.AnalysisServices

//for strStringConnection am passing Data Source=ServerName

static Server ServerConnect( String strStringConnection)

{

string methodCaption = "ServerConnect method";

Server svr = new Server();

try

{

svr.Connect(strStringConnection);

}

#region ErrorHandling

catch (AmoException e)

{

MessageBox.Show( "AMO exception " + e.ToString());

svr = null;

}

catch (Exception e)

{

MessageBox.Show("General exception " + e.ToString());

svr = null;

}

#endregion

return svr;

}

Is there any wrong with the code. Please advise the same.

Regards,

vishu

|||Looks right to me, except i tag 'Provider=msolap' on the end of my connection string, like:

'Data Source=ServerName;Provider=msolap'

But i tried it without the provider, and it worked also. So, i'm not sure i can be of any help.

C
|||

Thanks.It is working now.

I need some info like can we connect Ms As 2000 and Ms As 2005 from any one like either with DSO or AMO.

it this possible or else we have to mainatin separate things for above servers.

help me on this.

|||

No you cannot connect to both AS 2000 and 2005 using one API

AMO = AS 2005

DSO = AS 2000

If your app needs to manage both you will need to use both API's. You do not need the "provider=msolap" in the connect method, you should only need to pass in the server name eg. svr.Connect("localhost")

|||

Hi

Thanks,I am sending my current environment where i am working OS:win 2003 server and MS AS 2005 and .net 2.0.In my previous environment win 2000 and MS As 2000 by using DSO and ADOMD i worked there is no issues in that.My client wants both has to work.becaz they are migrating servers one by one.coming to the code In this i had written some Webmethods through which am managing Ms As 2000 with DSO(connecting to MSAS and managing).So now they are going to change the servers in to MS As 2005 and they need the same kind of functionality should work from win 2003 and MS As 2005 & .net 2.0.For MDX purpose we used ADOMD.

This is some wht migration work.

Is there any chances to communicate and maintain the both the calls and how help needed.

|||You will have to develop 2 branches of code. Keep the existing one that works with AS2000 and develop a new one for AS2005. You can use code similar to that which I suggested here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1523691&SiteID=1 to detect which version you are talking to.|||

Thanks Darren.

It is helped me to go further.

|||

Hi Darren Gosbell

I am working on some migration project.it is from AS 2000 to AS 2005.

I have to create a role in AS 2005.Is this one is similer functionality like in AS 2000.

Plz let me know.

I am using AMO for making connection i can able to connect and now i have to create a role,In my previous development we used to create a role in database then after in cube with the help of DSO.Could you please help on this.

if possible if you have any sample to create a role in AS 2005 with AMO please send to me.

Thanks in Advance.

vishu

sql

No comments:

Post a Comment