Поделиться через


Connect (clsServer)

ms135614.note(ru-ru,SQL.90).gifПримечание.
  В следующей версии Microsoft SQL Server эта возможность будет удалена. Не используйте ее при работе над новыми приложениями и как можно быстрее измените приложения, в которых она в настоящее время используется.

The Connect method of an object of ClassType clsServer connects to the Analysis server service (MSSQLServerOLAPService).

Синтаксис

dsoServer.Connect([ByVal ServerName As String])

Параметры

  • dsoServer
    A Decision Support Objects (DSO) server object.
  • ServerName
    The name of the computer on which the Analysis server is installed and running. You can use LocalHost to specify the Analysis server running on the same computer as your DSO application.

Замечания

The Connect method sets the name of the server object. If you need to reconnect to the same server, do not specify the name on subsequent executions of the method on the same object.

ms135614.note(ru-ru,SQL.90).gifВажно!
  You cannot use an Internet Protocol (IP) address as the ServerName parameter to connect to a server. You must use the network name of the computer that hosts the Analysis server.

Пример

Use the following code example to connect to the Analysis server:

Public dsoServer As DSO.Server
Set dsoServer = New DSO.Server
'Assume "Server1" to be the name of the computer
'where the Analysis server service is installed and running.
dsoServer.Connect "Server1"  'Error is raised if unable to connect

См. также

Справочник

clsServer

Справка и поддержка

Получение помощи по SQL Server 2005