Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Connection Class

The Connection class represents the connection parameters used to connect to the Longview server. Use the Connection class in conjunction with API.Connect to create a connection to the Longview system.

Connection Properties

The following table lists the properties of the Connection class:

Name Type Description

HostOrProxy

string

HostOrProxy specifies the host name or proxy of the data server  to connect to.

Identifier

string

Identifier specifies the Longview Identifier (LID) for the data server to connect to.

Port

string (optional)

Port specifies the port number of the data server to connect to.

This field is omitted if you specified a URL (starting with http/s) for an HTTP Proxy Server for the HostOrProxy field.

Example:

Dim LVAPI As Longview.API

Set LVAPI = New Longview.API

Set LVConnection = New Longview.Connection  

Dim rc As Long: rc = LVAPI.ErrorCode.NoError

 

' Set connection parameters With LVConnection

.Identifier = "DEMO101"

        .HostOrProxy = "MyServer"

.Port = "29010" End With rc = LVAPI.Connect(LVConnection, "JSmith", "xxx", "Administrators")

 

'You may also set the Connection info using Connection.SetServerInfo Call LVConnection.SetServerInfo ("DEMO101", "MyServer", "29010")

Connection.SetServerInfo

The Connection.SetServerInfo function sets the connection information. This function can be used in conjunction with the API.Connect function.

Parameters Description

Identifier

Type: string

Identifier specifies the Longview Identifier (LID) for the system to connect to.

HostOrProxy

Type: string

HostOrProxy specifies the host name or proxy of the data server  to connect to.

Port

Type: string (optional)

Port specifies the port number of the data server to connect to. This field is not required if you specified a URL (starting with http) for an HTTP Proxy Server for the Host field.

The Connection.SetServerInfo function returns the following:

Return Code Description

None

 

Example:

Dim LVAPI As Longview.API

Set LVAPI = New Longview.API

Set LVConnection = New Longview.Connection

       

Dim rc As Long: rc = LVAPI.ErrorCode.NoError

Call LVConnection.SetServerInfo ("DEMO101", "MyServer", "29010") rc = LVAPI.Connect(LVConnection, "JSmith", "xxx", "Administrators")

Published:

Connection Class

The Connection class represents the connection parameters used to connect to the Longview server. Use the Connection class in conjunction with API.Connect to create a connection to the Longview system.

Connection Properties

The following table lists the properties of the Connection class:

Name Type Description

HostOrProxy

string

HostOrProxy specifies the host name or proxy of the data server  to connect to.

Identifier

string

Identifier specifies the Longview Identifier (LID) for the data server to connect to.

Port

string (optional)

Port specifies the port number of the data server to connect to.

This field is omitted if you specified a URL (starting with http/s) for an HTTP Proxy Server for the HostOrProxy field.

Example:

Dim LVAPI As Longview.API

Set LVAPI = New Longview.API

Set LVConnection = New Longview.Connection  

Dim rc As Long: rc = LVAPI.ErrorCode.NoError

 

' Set connection parameters With LVConnection

.Identifier = "DEMO101"

        .HostOrProxy = "MyServer"

.Port = "29010" End With rc = LVAPI.Connect(LVConnection, "JSmith", "xxx", "Administrators")

 

'You may also set the Connection info using Connection.SetServerInfo Call LVConnection.SetServerInfo ("DEMO101", "MyServer", "29010")

Connection.SetServerInfo

The Connection.SetServerInfo function sets the connection information. This function can be used in conjunction with the API.Connect function.

Parameters Description

Identifier

Type: string

Identifier specifies the Longview Identifier (LID) for the system to connect to.

HostOrProxy

Type: string

HostOrProxy specifies the host name or proxy of the data server  to connect to.

Port

Type: string (optional)

Port specifies the port number of the data server to connect to. This field is not required if you specified a URL (starting with http) for an HTTP Proxy Server for the Host field.

The Connection.SetServerInfo function returns the following:

Return Code Description

None

 

Example:

Dim LVAPI As Longview.API

Set LVAPI = New Longview.API

Set LVConnection = New Longview.Connection

       

Dim rc As Long: rc = LVAPI.ErrorCode.NoError

Call LVConnection.SetServerInfo ("DEMO101", "MyServer", "29010") rc = LVAPI.Connect(LVConnection, "JSmith", "xxx", "Administrators")

For an optimal Community experience, Please view on Desktop