IPCOSRumaila

AF 2.0 Custom Data Reference and  PI/AF OLEDB

Discussion created by IPCOSRumaila on Jul 4, 2013
Latest reply on Jul 4, 2013 by IPCOSRumaila

Hi,

 

We created a Custom Data Reference for PI/AF for accessing data in a relational database. It is working fine when accessing through PI Explorer, PI Coresight and throug  AFSDK. Unfortunately when accessing the data via OLEDB we get an error: "The type initializer for 'PDMSCustomReference.PDMSCustomReference' threw an exception".   

 

So the first question is : is a Custom Data Reference supposed to work through OLEDB?

 

If not, no need to search further. But that would be bad news, the Custom Data Reference is performing very well,  it performs much faster than the external linked tables and allows setting values.

 

In case yes, there is some work to do :-( . Maybe I missed some function to be implemented in the interface?

 

Currently I have: 

 

public override AFAttributeList GetInputs(Object context);

 

public override string ConfigString

 

public override AFDataReferenceMethod SupportedMethods

 

public override void SetValue(Object context, AFValue newValue)

 

public override AFValues GetValues(Object context, AFTimeRange timeRange, int numberOfValues, AFAttributeList inputAttributes, AFValues[] inputValues)

 

public override AFValue GetValue(object context, object timeContext, AFAttributeList inputAttributes, AFValues inputValues)

 

I'm using .net 4.0 (through VS 2010 c# ), AFSDK 2.5.1.5159 AF Server 2.5.0.5039 . 

 

Thanks in advance for any advice on this issue!

Outcomes