You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

[ |../../index.htm#lansa/vgudb9_0035.htm]
You are here:

5.2.3 Set Session Options

You must set the session parameters before opening the host session.
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: 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.
[ |../../index.htm#lansa/vgudb9_0035.htm]

  • No labels