AnsweredAssumed Answered

How can use SQL Commands to update values in PI Data Archive using PIOLEDB within ou C

Question asked by zerenato on May 25, 2017
Latest reply on May 25, 2017 by pmartin


I try to execute the code bellow


        Dim Cmd As New OleDb.OleDbCommand

        Dim i As Integer

        Dim dr As OleDb.OleDbDataReader

        Dim CmdSQL As String

        Dim CnPI As New OleDb.OleDbConnection


        CnPI.ConnectionString = "Provider=PIOLEDB;Data Source=myCollective;Integrated Security=SSPI;Persist Security Info=False;Connect Timeout=2880;Command Timeout = 600000"


        Cmd.Connection = CnPI

        Cmd.CommandText = "delete FROM piarchive..picomp2 WHERE tag = 'sinusoid'  AND time BETWEEN '2017-01-01 00:00:00' AND '2017-01-02 00:00:00'"

        dr = Cmd.ExecuteReader()



And the result is


  "[PI SDK] Write failed.  Unbuffered write would desynchronize archive data. HIS"



Is there any way to use SQL Commands to write data in PI Data Archive?