abantly

InterpolatedValues2 throwing an exception for some queries

Discussion created by abantly on Jun 6, 2011
Latest reply on Jun 7, 2011 by Ahmad Fattahi

I am investigating a customer incident that I am able to reproduce with the "InterpolatedValues2" function.  If I ask for about 5 months of data, at 1 minute intervals, the method returns a HRESULT of 0x80020009 with the error description "Exception occurred.".  If I do the same request but increase the sample interval to 2 minutes then the query returns data.  This problem appears to be happening in 32 bit versions of the SDK 1.3.6 and 1.3.8.387.  To attempt to reproduce use the BA:TEMP.1 tag and use "1/1/2011" to "t" as the range and use "1m" as the sampling interval.

 

Here is some code

 
Dim Srvr As Server
Set Srvr = PISDK.Servers.Item("PIServer")

Dim Pt As PIPoint
Set Pt = Srvr.PIPoints("BA:TEMP.1")

Dim PtData As IPIData2
Set PtData = Pt.Data

Dim vNothing As Variant
Set vNothing = Nothing

Dim NValues As NamedValues
Dim PtValues As PIValues

Set PtValues = PtData.InterpolatedValues2("1/1/2011","t","1m","",fvRemoveFiltered,vNothing)

 

 

Here is a screen capture of the caught COM exception from my companies software, STATISTICA

 

---------------------------
STATISTICA
---------------------------
VBA Error in macro PIInterpolatedItvlTest.svb at line: 21
pisdk.dll
(&H80040526) Failed to retrieve events from server.  [-11128] Number of requested events exceeded the maximum allowed

 

---------------------------
OK  
---------------------------

Outcomes