on 12-10-2014 6:37 AM
Hi,
I am having error on this code
gDI(i) = CreateObject("SAPbobsCOM.Company")
gDI(i).Server = Trim(rs("SAP_SERVER"))
gDI(i).CompanyDB = Trim(rs("SAP_DBNAME"))
gDI(i).DbUserName = Trim(rs("SAP_DBUSER"))
gDI(i).DbServerType = SAPDBTYPE
gDI(i).DbPassword = SAPClass.Decrypt(Trim(rs("SAP_DBPASS")), Trim(rs("SAP_DBUSER")))
gDI(i).UserName = Trim(rs("SAP_COUSER"))
gDI(i).Password = SAPClass.Decrypt(Trim(rs("SAP_COPASS")), Trim(rs("SAP_COUSER")))
gDI(i).language = sapObject.ln_English
If LicenseServer.Trim.Equals("") = False Then
gDI(i).LicenseServer = LicenseServer
End If
It is working on SAP B1 8.82
But when I try It on SAP B1 2007 i am having this error.
Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
hi,
Try this..
oCompany = New SAPbobsCOM.Company
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
oCompany.LicenseServer = "ServerName:30000"
oCompany.Server = "ServerName:30000"
oCompany.CompanyDB = "DBName"
oCompany.DbUserName = "SA"
oCompany.DbPassword = "password"
oCompany.UserName = "manager"
oCompany.Password = "password"
oCompany.UseTrusted = False
dConnInt = oCompany.Connect
If dConnInt <> 0 Then
oCompany.GetLastError(errcode, erMsg)
End If
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.