Skip to Content
0
Former Member
Dec 09, 2005 at 02:57 PM

Language error when setting Context during Single sign on

22 Views

I am getting the following error: Run-time error -117. This language is not supported in this version. This is returning from the setSBOLoginContext(strConn) method. I have no idea why this is happening. Any suggestions?

Dim SboGuiApi As New SAPbouiCOM.SboGuiApi

Dim sConnectionString As String

Dim strConn As String

Dim sCookie As String

Dim ret As Long

'//Connect to the GUI API Application Object

Set SboGuiApi = New SAPbouiCOM.SboGuiApi

sConnectionString = Command

'// connect to a running SBO Application

SboGuiApi.Connect sConnectionString

'// get an initialized application object

Set SBO_Application = SboGuiApi.GetApplication()

'//Single sign on to DI Api Company Object

'//Acquire the connection context cookie from the DI API.

Set vCompany = New SAPbobsCOM.Company

sCookie = vCompany.GetContextCookie

'//Retrieve the connection context string from the UI API using the 'acquired cookie.

strConn = SBO_Application.Company.GetConnectionContext(sCookie)

'// ensure company is not connected

If vCompany.Connected = True Then

vCompany.Disconnect

End If

'Set the connection context information to the DI API.

ret = vCompany.SetSboLoginContext(strConn)