I have build an application to insert data in SAP. Initially it is working fine but after every 1 or 2 hour it is getting the error
"you are not connected to a company".
My code to connect company is like this.
oCompany.Server = "xyz"
oCompany.language = BoSuppLangs.ln_English;
oCompany.DbUserName = sa;
oCompany.DbPassword = password;
oCompany.CompanyDB = abc;
oCompany.UserName = sa;
oCompany.Password = password;
int ResponseCode = oCompany.Connect();
please help me.
Thanks in advance