OPCHDA.NET Reference Manual
Insert(Int32,Int32[],Int64[],Object[],Int32[],Int32,Int32[]) Method
See Also  Send Feedback
OpcHDAWrapperUA.Net4 Assembly > OPCHDA.NET Namespace > OpcHDAServer Class > Insert Method : Insert(Int32,Int32[],Int64[],Object[],Int32[],Int32,Int32[]) Method

transactionID
An identifier created by the client and passed to the server in this call. The server shall return this identifier along with the results of this call.
server
The list of server item handles for the items to be inserted.
timeStamps
Array of FileTimeUTC time stamps for the new values.
dataValues
Array of structures which contain the item values.
qualities
Array of the quality flags of the new values. These are the Data Access Quality flags, not the HDA quality flags.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Glossary Item Box

This asynchronous function inserts values and qualities into the history database for 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 function 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 results are returned via the client's UpdateComplete event handler.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Insert( _
   ByVal transactionID As Integer, _
   ByVal server() As Integer, _
   ByVal timeStamps() As Long, _
   ByVal dataValues() As Object, _
   ByVal qualities() As Integer, _
   ByRef cancelID As Integer, _
   ByRef errors As Integer() _
) As Integer
C# 
public int Insert( 
   int transactionID,
   int[] server,
   long[] timeStamps,
   object[] dataValues,
   int[] qualities,
   out int cancelID,
   out int[] errors
)

Parameters

transactionID
An identifier created by the client and passed to the server in this call. The server shall return this identifier along with the results of this call.
server
The list of server item handles for the items to be inserted.
timeStamps
Array of FileTimeUTC time stamps for the new values.
dataValues
Array of structures which contain the item values.
qualities
Array of the quality flags of the new values. These are the Data Access Quality flags, not the HDA quality flags.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Return Value

S_OK, S_FALSE, E_NOTIMPL, E_INVALIDARG, E_FAIL

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2008/2012/2016, .NET 4.x

See Also

Copyright © 2002-2018 Advosol Inc. All Rights Reserved.