Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8411

Re: Unable to make DI connection to a second company using current company's user login context

$
0
0

Hi Ronnie,

 

I was a bit surprised and did a test... Which was successfull (PL11). What I did:

                comp2 = new SAPbobsCOM.Company();

                var cookie = comp2.GetContextCookie();

                var context = application.Company.GetConnectionContext(cookie);

                comp2.SetSboLoginContext(context);

                comp2.CompanyDB = "myNewDb";

                var retCode = comp2.Connect();

All without specifying any of the existing values just like you did, but I don't thing this is the issue. In my understanding, the issue is that you are getting the initial cookie from the wrong company:the code is trying to get it from an already connected company, insead of the one for which you want to connect.

Regards,

Eric


Viewing all articles
Browse latest Browse all 8411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>