Initialize the Session

Visual LANSA

Initialize the Session

 

Private Session As LANSA_ACTIVEX_LIB.ISession

Private Sub ConnectToLansa( _
    ByVal username As String, _
    ByVal password As String))
Try

    ' Create the Session object
    Session = New LANSA_ACTIVEX_LIB.Session
    
    ' Set the session configuration file
    Session.ConfigFile = "./Session.cfg"

    ' Set the User and Password    
    Session.SetConnectParam("USER", username)
    Session.SetConnectParam("PSPW", password)
    
    ' Connect to LANSA
    Session.Connect
    
      Catch ex As Exception
            MessageBox.Show("Exception : " + ex.Message)
End Try

 

End Sub

 

Ý 7.3.5 Syntax differences from Visual Basic 6.0 to Visual Basic.NET