SAP Business One able integrates with another software development such as Visual Basic 6 and .Net.
Now, I will share to you how to connect SAP B1 using visual basic.
First you must be installing SDK SAP B1, after that you must add SAP business one DI API version on Visual basic Reference.
Below is the source code. Note: Make sure your user id and password set correctly. System will lock your user id if you input invalid login until 3 timesPublic oCompany as SAPbobsCOM.CompanyPublic lerr As Long, sErr As StringSet oCompany = New SAPbobsCOM.CompanyWith oCompany.Server = your SAP Server name.CompanyDB = your SAP Database name.UserName = your SAP user.Password = your SAP password.DbServerType = dst_MSSQL2005.language = ln_English.UseTrusted = False.DbUserName = your SQL database user name.DbPassword = your SQL database password namelerr = oCompany.Connect()If lerr <> 0 ThenCall oCompany.GetLastError(lerr, sErr)MsgBox sErrElseMsgbox “Connected to SAP B1”End IfEnd With
No comments:
Post a Comment