The SDK UpdateValue method is frequentIy employeed in my VBA code to enforce pdi functionality. It works very well unitl today when I try to update a string tag. Codes are as below.
On Error Resume Next
Set pisdk = CreateObject("PISDK.PISDK")
Set piSrv = pisdk.Servers.DefaultServer
If piSrv.Connected = False Then piSrv.Open "UID=pidemo"
Dim ptEe As PIPoint
Dim piErr As PIError
Dim spreEe As String, sEe As String
Set ptEe = piSrv.PIPoints("MyStringPoint")
spreEe = ptPreEe.Data.Snapshot
set piErr = ptEe.Data.UpdateValue (spreEe, "*", dmReplaceDuplicates)
MsgBox "1 " & CStr(piErr.Number) + " : " + CStr(piErr.Cause) + " : " + piErr.Source + " : " + piErr.Description
MyStringPoint is a PI point defined in the database with write access for all users.
Codes in bold are new written to direct me to the error, but they do not work.
Something really confuse me is that, the code (without those in bold) work for my computer, via Processbook or Activeview, but not for others.
Could you please me drop me a hint what to be aware of when update string value through SDK Updatevalue method?
Thanks in advance!