Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2812

Re: Connection to SAP B1

$
0
0

Hello Ambesh,

 

Your code seems right but sometimes connection fails due to IP/Name configuration. Check Choose Company form within SAP Business OneClient to make sure you are giving the right values. Also could you try connecting with the below pattern?

 

SAPbobsCOM.Company oCompany;

 

oCompany = new SAPbobsCOM.Company();          

            

oCompany.Server = "sapsrv";

oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2014;

oCompany.CompanyDB = "SBODemo_UK";

oCompany.UserName = "manager";

oCompany.Password = "B1Admin";

 

int ret = oCompany.Connect();

 

if (ret == 0)

  MessageBox.Show("Connection ok");

else

  MessageBox.Show("Connection failed: " + oCompany.GetLastErrorDescription());

 

 

Thanks,

Atilla


Viewing all articles
Browse latest Browse all 2812

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>