Skip to Content
0
Jun 09, 2016 at 12:52 PM

Problem to connect with DI API

123 Views

Hello,

I'm trying to make a connection through the DI API and am having a problem.

I will list below what happens:

I have two servers, one license, DNS SAP-APP (192.168.8.190) and one for the database DNS SAP-DB (192.168.8.191)

The name of the database machine is WIN-7O8EIJ4KKQ7

The name of the license machine is WIN-040ASJ0T935

When I try to connect using the configuration below, the following error is returned:

function ... {

oCompany.Server = "WIN-7O8EIJ4KKQ7";

oCompany.LicenseServer = "WIN-040ASJ0T935";

oCompany.language = BoSuppLangs.ln_English;

oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012;

oCompany.DbUserName = "MyUserDB";

oCompany.DbPassword = "MyPasswordDB";

oCompany.CompanyDB = "SBODB";

oCompany.UserName = "MyUserSAP";

oCompany.Password = "MyPasswordSAP";

int con = oCompany.Connect();

if (con == 0)

{

MessageBox.Show("Success");

return true;

}

else

{

MessageBox.Show("Not connected : " + oCompany.GetLastErrorDescription());

return false;

}

}

In this case the error returned is: -

It does not connect, but does not display an error message only a hyphen

if I remove the line oCompany.LicenseServer = "WIN-040ASJ0T935"

the error is: Connection to license server failed; license service address is not valid, or license server is stopped

Can anyone help me?