Quantcast
Viewing all articles
Browse latest Browse all 9063

Re: Fails to connect

Hi Maik,

 

Thanks for your answer.

No such error happened in my server standalone that its OS is win 7 pro and SQL server 2008R2.

I use VS.2010 vb.net. It's really unexciting and disappointing.

 

Here is my connection:

Private Function SetApplication() As Boolean

        Dim bReturnValue As Boolean = False

        Dim SboGuiApi As SAPbouiCOM.SboGuiApi

        Dim sConnectionString As String

 

 

        SboGuiApi = New SAPbouiCOM.SboGuiApi

        sConnectionString = Environment.GetCommandLineArgs.GetValue(1).ToString

       SboGuiApi.Connect(sConnectionString)

        moSBOApplication = SboGuiApi.GetApplication()

        If Not moSBOApplication Is Nothing Then

            bReturnValue = True

            moSBOApplication.StatusBar.SetText("Connected to SBO Client GUI", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)

        End If

        AXAAddOnLibrary.modGlobal.M_SBOApplication = moSBOApplication

        Return bReturnValue

    End Function

 

 

    Private Function SetConnectionContext() As Integer

        Dim sCookie As String

        Dim sConnectionContext As String

 

 

        moSBOCompany = New SAPbobsCOM.Company

        moSBOCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008

'new additional

        If moSBOCompany.LicenseServer = "sbo" Then

            moSBOCompany.connect()

        End If

        'Result = moSBOCompany.Connect()

        moSBOApplication.StatusBar.SetText("Trying to get Context Cookie", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_None)

        sCookie = moSBOCompany.GetContextCookie

        sConnectionContext = moSBOApplication.Company.GetConnectionContext(sCookie)

        moSBOApplication.StatusBar.SetText("Success trying to get Context Cookie", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Success)

        If moSBOCompany.Connected = True Then

            moSBOCompany.Disconnect()

        End If

 

 

        moSBOApplication.StatusBar.SetText("Trying to set SBO Login Context", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_None)

        SetConnectionContext = moSBOCompany.SetSboLoginContext(sConnectionContext)

        moSBOApplication.StatusBar.SetText("Success trying to set SBO Login Context", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Success)

    End Function

 

 

    Private Function ConnectToCompany() As Integer

        ConnectToCompany = moSBOCompany.Connect

        moSBOApplication.StatusBar.SetText("Connected to SBO Company Database", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)

        AXAAddOnLibrary.modGlobal.M_SBOCompany = moSBOCompany

        AXAAddOnLibrary.modGlobal.M_CompanyService = moSBOCompany.GetCompanyService

        AXAAddOnLibrary.modGlobal.M_AdminInfo = AXAAddOnLibrary.modGlobal.M_CompanyService.GetAdminInfo

    End Function

 

 

pls provide me a solution for this issue

 

 

Rgds,

Steve


Viewing all articles
Browse latest Browse all 9063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>