Hi Experts.
I'm having the following problem when connecting to Api Di: "Database server type not supported".
The strange thing is that until yesterday was working normally.
I use SAP B1 9 - 10 PL / SQL 2012.
The ServerType object di is correct, is SQL 2012 (checked at runtime).
Has anyone gone through this problem?
Below is a snippet of my code that connects with Di.
public void SetApplicationDI()
{
try
{
int lErrCode;
string sErrMsg = "", sCookie = "", sConnectionContext = "";
diCompany = new SAPbobsCOM.Company();
sCookie = diCompany.GetContextCookie();
sConnectionContext = uiApplication.Company.GetConnectionContext(sCookie);
if (diCompany.Connected == true)
{
diCompany.Disconnect();
}
else
{
diCompany.SetSboLoginContext(sConnectionContext);
diCompany.UseTrusted = false;
diCompany.Connect();
}
diCompany.GetLastError(out lErrCode, out sErrMsg);
if (lErrCode != 0) throw new Exception(sErrMsg);
}
catch (Exception e)
{
throw e;
}
}