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