I'm trying to start and stop the OLAP service (Analysis Services) of a remote server using DSO into VB.

I'm able to do this using the utility "SQL Server services Manager". I can connect to a remote server and start and stop the OLAPO service.

I'm programming a VB dll trying to do the same but I'm not able. The dll works when the server managed is "localhost", but it doesn't works with a remote server. E.G. If I try to stop the OLAP service on the remote machine, I've access to the status of the remote service, but when I order it to stop, the servie stopped is the local one, not the remote. Below is teh code I'm using.

Thanks in advance

Public dsoServer As DSO.Server
Set dsoServer = Nothing
Set dsoServer = New DSO.Server
dsoServer.Connect (remoteservername)

'This works OK, it tells me the status of the remote server: 4=running

dsoServer.ServiceState = 1
'1 means stopped service. Instead of stopping the remote
'service it stops the local one

'This works OK again, it tells me the status of the remote server: 4=running

I can't understand why the set instruction (dsoServer.ServiceState = 1) works on the local service and the get instruction (dsoServer.ServiceState) works on remote. I don't change the server parameters between one and the other. ¡¡HELP please!!