OPC Historian .NET Server Toolkit Reference
UpdateInsert(Int32[],DateTime[],Object[],Int32[],Int32[]) Method

The list of server item handles for the items to be inserted.
Array of the time stamps for the new values.
Array of objects which contain the new item values.
Array of the quality flags of the new values. These are the Data Access Quality flags, not the HDA quality flags.
Array of HRESULTS indicating whether the corresponding server handle was valid.
Professional Edition only.
This method inserts values and qualities into the history database at the specified timestamps for one or more items. If a value exists at the specified timestamp, the new value shall not be inserted; instead errors shall indicate an error. This method is intended to insert new values at the specified timestamps; e.g., the insertion of lab data to reflect the time of data collection. The serverHnd, timeStamps, dataValues and qualities are arrays of equal size. To insert a value for a number of different items at a single time, then timeStamp array would have the same time for each item. To insert a stream of values, timestamps and qualities for a single item, set the size of the item array to the number of values to be inserted and put the same ItemID in each element.
Syntax
'Usage
 
Dim instance As AppPlugin
Dim serverHnd() As Integer
Dim timeStamps() As Date
Dim dataValues() As Object
Dim qualities() As Integer
Dim errors As Integer()
Dim value As Integer
 
value = instance.UpdateInsert(serverHnd, timeStamps, dataValues, qualities, errors)
public int UpdateInsert( 
   int[] serverHnd,
   DateTime[] timeStamps,
   object[] dataValues,
   int[] qualities,
   out int[] errors
)

Parameters

serverHnd
The list of server item handles for the items to be inserted.
timeStamps
Array of the time stamps for the new values.
dataValues
Array of objects which contain the new item values.
qualities
Array of the quality flags of the new values. These are the Data Access Quality flags, not the HDA quality flags.
errors
Array of HRESULTS indicating whether the corresponding server handle was valid.

Return Value

HRESULTS success/error code.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AppPlugin Class
AppPlugin Members
Overload List

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback