4 Replies Latest reply on Sep 23, 2013 7:40 AM by hanyong

    PI Soap mdac error

    greg.kling

      Hi all,

       

      Has anyone seen this error when using PI Soap? I am using FindElements() in C# with Visual Studio 2010 and keep getting this error. I am on windows 7 64 bit.

       

      "The .Net Framework Data Providers require Microsoft Data Access Components(MDAC).  Please install Microsoft Data Access Components(MDAC) version 2.6 or later."

       

      Is there a specific reference I need to add to get this to work? I have tried re-installing mdac.

       

      Thanks,

       

      Greg

        • Re: PI Soap mdac error
          hanyong

          Hi Greg,

           

          Just from this error, it would seem like the problem is stemming from MDAC. I would first try to determine where the error is coming from to be sure though. Are all the relavant component or services (C# client, PI Web Services,  AF Server, SQL Server) running on 1 machine or you have them distributed on different machines? 

           

          If you call the method from other machines, or client, are you getting the same error? What if you are calling a method that doesn't access PI AF, like searching for PI Point?

           

          There are some articles online that talks about similar error with MDAC when installing newer version of .NET Framework. The resolution can range from installing latest version of MDAC to something more complicated like:http://social.msdn.microsoft.com/Forums/vstudio/en-US/8775ee9c-f48a-4f2e-89dd-92e5f5c59799/the-net-framework-data-providers-require-microsoft-data-access-componentsmdac

           

          Nevertheless, determining where the error is coming from is still important before trying to resolve the issue, especially if the components are distributed.

            • Re: PI Soap mdac error

              You know, I had this problem with PI Web Services and got round it but can't for the life of me remember how! Vaguely remember it was nothing to do with MDAC but security/permissions...that's not really helpful is it. I'll try and remember what I did.

                • Re: PI Soap mdac error
                  greg.kling

                  Thanks for the responses. It turns out I was missing the impersonation piece.  

                   

                  After I added the following lines, with a little help from a co-worker, the issue was gone.

                   
                      client = new PIWSSoapRef.PISoapServiceClient("SoapEndpoint", "http://AFServer/PIWebServices/PISoap.svc");
                      client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;
                  

                   Thanks again for helping so quick. Now on to bigger and better things.

                   

                  -Greg