Skip to Content
author's profile photo Former Member
Former Member

Company connection

Hi xperts,

I got this code in tutorial, but how to run it in Visual Basic means stepwise how projects need to be created and etc?

Dim oCompany As SAPbobsCOM.Company

Dim lRetCode, lErrCode As Long

Dim sErrMsg as String

'Instanciate a Company object

oCompany = New SAPBobsCOM.Company

oCompany.Server = "(local)"

oCompany.CompanyDB = "SBODemo_US"

oCompany.UserName = "manager"

oCompany.Password = "manager"

oCompany.Language = ln_English

u2018Sample: E.g.use Windows Auth.(MSSQL only)

oCompany.UseTrusted = True

u2018Set AddOn identifier u2013 a long string with numbers; identifies

u2018your Add-On against License Service u2026 optional!

u2018oCompany.AddOnIdentifier = u201Cfill in your Add-On Identifier hereu201D

lRetCode = oCompany.Connect()

'Check Return Code

If lRetCode <> 0 Then

oCompany.GetLastError(lErrCode, sErrMsg)

End If

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 10, 2011 at 11:47 AM

    HI,

    Post your question in SDK forum for quick replies:

    SAP Business One SDK

    Neetu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.