2 Replies Latest reply on May 3, 2011 3:09 AM by hanyong

    PI-OLEDB Dataset for Porcess Book


      Does anyone have any experience createing a data set dynamically in VBA for PI-OLEDB queries or know if there is an add-in available for PI-OLEDB for ProcessBook.  I did some searching and the best I could find is a white paper dated from 2001 for how to create a custom data set.  As prevelent as PI-OLEDB is I am surpised that I have not found anything, so any help/advice would be appreciated.

        • Re: PI-OLEDB Dataset for Porcess Book



          We don't have yet any ready sample code available in vCampus to create dynamically ProcessBook Datasets using PI-OLEDB especifically, but you may be interested checking the webinars Programming .NET Add-Ins for PI ProcessBook and PI OLEDB and Beyond.


          After watching them, you may want to download the appropriate .NET project template for ProcessBook add-in (C# or VB.NET, depending on your programming taste, both available in the Download Center under the "Extras" Category) and use it to start building a PB add-in that uses the PI OLEDB go get the data in order to implement the IDataProvider3 interface (documented in the PI ProcessBook VBA Language Reference).


          Hope this helps!

            • Re: PI-OLEDB Dataset for Porcess Book



              A question that I have in mind is what type of information are you trying to get by creating a  PI OLEDB Dataset in ProcessBook?


              Also does it have to be a Dataset in Processbook like, PI Calculation Dataset or AF 2 Dataset? or you are simply looking for a way to run PI-OLEDB queries and display the result in ProcessBook?


              To add on to Daniel's suggestions, you can also access PI via PI OLEDB using Microsoft ADO library in ProcessBook VBA. I've attached a very simple example for this. This and creating a .NET add-ins are 2 very different approaches, I can't say which of these options is a better choice for you, if you can let us know more about your requirements, perhaps this would become clearer.