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

System.Runtime.InteropServices.COMException (0xFFFFF448): The logged-on user does not have permission to use this object at SAPbobsCOM.ICompany.GetBusinessObject(BoObjectTypes Object)

$
0
0

Hello,

 

I am trying to add test BP record B1. I am able to connect to B1 successfully.But when i am trying to insert the record, i am getting following error.

 

error1.png

 

 

Code:-

 

     oComp = new SAPbobsCOM.Company();

            oComp.Server = "**************";

            oComp.CompanyDB = "APHS_CONSOLE_LIVE";

            oComp.DbUserName = "******";

            oComp.DbPassword = "******!";

            oComp.UserName = "manager";

            oComp.Password = "******";

            oComp.language = SAPbobsCOM.BoSuppLangs.ln_English;

             oComp.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012;

 

 

            oComp.LicenseServer = "localhost:30000";

            oComp.UseTrusted = false;

            string error1 = "";

            int temp=-1;

            try{

           temp= oComp.Connect();

           if (oComp.Connect() != 0)

           {

               error1 = oComp.GetLastErrorCode() + "\n" +

                       oComp.GetLastErrorDescription();

           }

           c = "Connected successfully- line 157" + temp+" - "+error1;

           SAPbobsCOM.BoObjectTypes obj=new SAPbobsCOM.BoObjectTypes();

           SAPbobsCOM.BusinessPartners oCustomer = oComp.GetBusinessObject(obj);

           oCustomer = oComp.GetBusinessObject(obj);

           oCustomer.CardCode="8881212";

           oCustomer.CardName = "Chaitanya";

           oCustomer.Add();

 

 

            }

            catch(Exception e)

            {

                string error = oComp.GetLastErrorDescription();

                xml = finalOutput(temp + " -line169- " + e.ToString() + " - " + error);

                return xml;

            }

 

 

            //test part

 

 

           

            xml = finalOutput(c);

            return xml;


Viewing all articles
Browse latest Browse all 3548

Trending Articles