Problem with updating data in same timestamp

Discussion created by anup on Apr 28, 2011
Latest reply on Apr 28, 2011 by Ahmad Fattahi

I cannot use the ReplaceValue Method (IPIData2 interface) properly
I am getting this error when executing-
{"Failed to update events on the server. [-11075] Target event for replacement not found in record"}


The situation i am doing this is that in my PI Server there are multiple data at same time . Now i have to find a way to update a particular record.
If i try to go with normal update only the last insertted record is updated , what if i wast the 3rd last to be updated with the value from 4th. I am pasting the code sniplet.



IPIData2 data2 = (IPIData2)pt.Data;
PIValues values = pt.Data.RecordedValues(dt, dt.AddDays(1), BoundaryTypeConstants.btInside, String.Empty, FilteredViewConstants.fvShowFilteredState, null);
data2.ReplaceValue(values[4], values[3], null);

 Plz suggest a way for inserting.


 I am also attaching the screensot of the data. Though in the screen sot its timestamp as value there may be sting/number etc. also8420.img.JPG