Examples: ServerName property (NotesSession - LotusScript®)

This Visual Basic code displays the server name or an exception message if it is running on a client.

Private Sub ServerName_Click()
Dim s As New NotesSession
s.Initialize
  If s.ServerName <> Null Then
    MsgBox s.ServerName, , "ServerName"
  Else
    MsgBox "Running on a client", , "Not a server"
  End If
End Sub