Quantcast
Channel: OPC Labs - OPC Labs - Recent Topics - OPC Labs Online Forums
Viewing all articles
Browse latest Browse all 1794

Error Writing a string value -> Write failed. Reason: BadWriteNotSupported - by: albi.majun.1960@gmail.com

$
0
0
Hello support,

I'm getting this error in subject simpling writing a string in a field (string), see attachment "Write failed. Reason This email address is being protected from spambots. You need JavaScript enabled to view it."
Instruction is quite simple:


server$ = Trim(txtServer.Text)
nodo$ = Trim(txtNodeId.Text)
cosa$ = "ABC12345/2021"

Call Client.WriteValue(server$, nodo$, cosa$)

If Err.Number <> 0 Then

'txtResult.Text = ("WriteResult= ") & Err.Number & " - " & Err.Description
List1.AddItem ("Errore WriteResult ")
List1.AddItem (Err.Number)
List1.AddItem (Err.Description)
List1.AddItem ("

")

valore = Client.ReadValue(txtServer.Text, "ns=2;s=CurrentJobs.CurrentJob1.Order.OrderDataControl.SAPNumberResponse")
List1.AddItem (" >>> Response ")
List1.AddItem "SapNumberRequest" & valore

Else

valore1 = Client.ReadValue(txtServer.Text, "ns=2;s=CurrentJobs.CurrentJob1.Order.OrderDataControl.SAPNumberRequest")
valore2 = Client.ReadValue(txtServer.Text, "ns=2;s=CurrentJobs.CurrentJob1.Order.OrderDataControl.SAPNumberResponse")
List1.AddItem (" >>> Read response : ")
List1.AddItem (valore1)
List1.AddItem (valore2)

End If[/i]


I was able to do the same action in the same field on july 2021, see attachment for positive results:

This email address is being protected from spambots. You need JavaScript enabled to view it.
WriteSapField_ This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
WriteSapField_ MachineHDMI_2021-07-17 at 11.10.37.jpeg

What I noticed is that
SourceTimeStamp and ServerTimeStamp values are aligned so 17/07/2021 11:53:xx

Instead today, as you can see from attachment "Write failed. Reason This email address is being protected from spambots. You need JavaScript enabled to view it."
SourceTimeStamp 18/11/2021 and ServerTimeStamp 07/12/2021 values are NOT aligned.

I did some search before opening this new topic, also in this Forum, and this error seems to be common an honestly I don't know how hot to fix it with
Which sequence of command have I to perform to fix the issue and to be able to write correcly such a SAP field

Any suggestion is welcome, thanks

BR
Alberto

Viewing all articles
Browse latest Browse all 1794

Trending Articles