The following example assumes a connection type that uses the "host" keyword token:
Sub Demo ()
Dim hostName As String
hostName = Session.ConnectionSetting("host")
MsgBox hostName
End Sub