cancel
Showing results for 
Search instead for 
Did you mean: 

No SAP Business One Application was found

Former Member
0 Kudos

Hi

  In the below code everytime it is giving message "No SAP Business One Application was found". Sap is open & add-on is also running. I am in debugging mode checking code. Command line arguments are 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056

Private Sub SetApplication()

        Dim sConnectionString = Environment.GetCommandLineArgs.GetValue(1)

        Try

            SboGuiApi.Connect(sConnectionString)

            SBO_Application = SboGuiApi.GetApplication()

            oCompany = New SAPbobsCOM.Company

            oCompany = SBO_Application.Company.GetDICompany()

        Catch ex As Exception

            SBO_Application.MessageBox("No SAP Business One Application was found")

            GC.Collect()

        End Try

    End Sub

    Public Sub New()

        MyBase.New()

        Try

            SetApplication()

            AddMenuItems()

        Catch ex As Exception

            MessageBox.Show(ex.Message)

        End Try

    End Sub

Accepted Solutions (0)

Answers (1)

Answers (1)

maik_delly
Active Contributor
0 Kudos

Hi Sonu,

this sounds like a 32/64 bit issue.

Start 32 bit client and compile/run your program for x86.

regards,

Maik

Former Member
0 Kudos

Hi Malik

   How to start 32bit client. I am working on Windows7 64bit machine .

Thanks

edy_simon
Active Contributor
0 Kudos

Hi Sonu,

Did you install 32 bit SBO or 64 bit SBO?

And at the time, are you running the 32bit ? or 64bit ?

You need to match this platform to your  Visual Studio Solution Platform

ie. if you are running 32bit SBO, set your Visual Studio Target Platform to x86, not Any CPU nor amd64/

Regards

Edy