oCompany = New SAPbobsCOM.Company
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
oCompany.LicenseServer = "ServerName:30000"
oCompany.Server = "ServerName:30000" <--- You don't need to put the PORT 30000. Ex : "localhost"
oCompany.CompanyDB = "DBName"
oCompany.DbUserName = "SA"
oCompany.DbPassword = "password"
oCompany.UserName = "manager"
oCompany.Password = "password"
oCompany.UseTrusted = False <--- "By default this method is set to false"
dConnInt = oCompany.Connect
If dConnInt <> 0 Then
oCompany.GetLastError(errcode, erMsg)
End If
Regards,