Hello Developers,
I am new to this forum and would like to ask a very special question concerning the single signon possibility with 6.50.
We developed an addon in MS VCPP 6.0 using a login window to connect to the DI. Whenever we want to use the single signon in 6.50 we do not get a valid cookie, that is we only see '??????....' in the debug information. We also used the provided example programs in Visual Basic, but did not cope with a valid cookie. Where is the error? Thank you for your help in advance.
Peter
-
SAPbobsCOM::ICompanyPtr iCompanyPtr("SAPbobsCOM.Company");
m_cmp = iCompanyPtr;
bstrt Cookie = m_cmp->GetContextCookie();
bstrt ConnectionStr =
m_con->Company->GetConnectionContext(Cookie);
long Ret = m_cmp->SetSboLoginContext(ConnectionStr);
if (Ret != 0) {
MessageBox(NULL,"Connection to DI impossible", "Error", MB_OK);
return false;
}
Hi Peter
Welcome to this forum.
The context inside the cookie is encrypted. This is the reason that you see only question marks (?????).
If you want to change one of the connection parameters you can do it before doing the Connect method.
For example:
If I'm interested to update the username and the password I will add the following lines:
oCompany.UserName = "manager"
oCompany.Password = "manager"
Just before this line:
oCompany.Connect
Add a comment