I am trying to connect to the company database as suggested in DIAPI in sap b1 sample codes...I am not able to do so...
Here is the code that i wrote in C#..
company = new Company();
company.Server = "servername";
company.CompanyDB = "Training";
company.UseTrusted = true;
company.language = BoSuppLangs.ln_English;
company.UserName = "";
company.Password = "";
int retcon = company.Connect();
if (retcon != 0)
{
MessageBox.Show("The connection with the database was not established.");
}