krachtr

Settting the Questionable attribute

Discussion created by krachtr on May 25, 2010
Latest reply on Oct 28, 2011 by hanyong

I've got a VB6 app that I've used for years to read data out of an Access databse and write it to PI. I decided that I would like to start setting the "Questionable" attribute on a subset of the data. I read the PI-SDK and it had a great example of how to do it (even in VB6) but I can't seem to get it to work. Here is the pertinent part of the code. Looping through the Access recordset:

 

For j = 1 To oRs.RecordCount         'loop through the listbox
    Set oNv = New NamedValues     'get ready to set "Q" attrib
    Set oPiPoints = oServer.PIPoints                'all the server points
    Set oPiPoint = oPiPoints.Item(oRs!TagName) 'get the one we need
    oNv.Add "Questionable", True    'add

    Set oPiData = oPiPoint.Data                    'ref the data
    Set oPiData.RetrievalAttributes = oNv  'set the ref to the Q attrib

    oPiData.UpdateValue oRs!Value, varTimeStamp

    oRs.MoveNext
    DoEvents
Next j

 

I don't get any errors but Questionable never gets set.

 

Where have I gone a stray?????

 

 

 

thanks Rusty

Outcomes