現在地: Visual LANSA 開発者ガイド > 2. グラフィカル・ユーザーインターフェース・アプリケーションの作成 > 2.28 リポジトリのリソース > セッションの初期化
セッションの初期化

 

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