Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You must set the session parameters before opening the host session.

Note
Note: To run the program, replace UserID, Password and System with your own.
   

...

  'Set Session ID
    
    '

...

 System / User dependent parameters, replace to run program !
    iRet = LceUseUserId(iSession, "USERID")

...

     If iRet = LceTrue Then iRet = LceUsePassword(iSession,

...

 "PASSWORD")

...

     If iRet = LceTrue Then iRet = LceUseSystem(iSession,

...

 "SYSTEM")

...

     If iRet = LceTrue Then iRet = LceUsePartition(iSession,

...

 "DEM")

...

     If iRet = LceTrue Then iRet = LceUseLanguage(iSession,

...

 "ENG")
        
    '

...

 set file for session
    If iRet = LceTrue Then iRet = LceUseFile(iSession,

...

 "SKLTAB")
    '

...

 set fields for session
    If iRet = LceTrue Then 
       iRet = LceUseField(iSession,"SKILCODE,SKILDESC")

...

     End If
    
    If iRet = LceFalse Then

...

         MsgBox "Set Session failed"
        End

...

     End If
Note
Note: Almost all LANSA functions return an integer, 1 (LceTrue) for success or 0 (LceFalse) for failure. VB True cannot be used because it is defined as -1.