Skip to Content
0
Former Member
Dec 18, 2007 at 10:56 PM

Connecting to company database

63 Views

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.");

}