Quantcast
Channel: SCN : Unanswered Discussions - SAP on SQL Server
Viewing all articles
Browse latest Browse all 519

Error connecting Di

$
0
0

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;

            }

        }


Viewing all articles
Browse latest Browse all 519

Trending Articles