We have written a command line tool that reads a formatted data file and writes the data to some PI points using the AFSDK. We want to prevent the overwriting of a value at a given timestamp and the insertion of two values at a given timestamp. We try to use the "OSIsoft.AF.Data.AFUpdateOption.NoReplace" option with the PIPoint.UpdateValues() method as follow :
But we don't get the expected result. Even if a value already exists for a given timestamp, a second value is inserted at the same timestamp. We are sure the timestamps are exactly identical, because those are daily data and we set the same time for all of them in our tool. We are using PI Server 2012 and AFSDK 2.6.
What is the best way to prevent the overwriting of a value at a given timestamp and the insertion of two values at a given timestamp ? The perfect behaviour for us would be that this kind of attempts could be logged easily.