SalJSONDeserializeUDV breaks STRING_Null retrieval

Report bugs and possible workarounds.
Holger
Germany
Posts: 25
Joined: 07 Mar 2018, 13:43
Location: Oberkirch, Germany

SalJSONDeserializeUDV breaks STRING_Null retrieval

Post by Holger » 02 May 2019, 11:50

Hi together,

can someone perhaps be so kind to verify the following:

There is a class with a instance string variable "test". In a function the variable gets first set to "STRING_Null". Then SalJSONDeserializeUDV gets called with e.g. {"test":"testvalue"} and the variable gets as a result a value. So far so simple.
Afterwards, the variable has a value you can check (test = 'testvalue'), but its also always STRING_Null. Checking test = STRING_Null will always return 1, regardless what value :o :?: .
This problem doesn't exists if you don't initialize with "STRING_Null", but with "" aka an empty string.

Thanks in advance
Holger

Holger
Germany
Posts: 25
Joined: 07 Mar 2018, 13:43
Location: Oberkirch, Germany

Re: SalJSONDeserializeUDV breaks STRING_Null retrieval

Post by Holger » 02 May 2019, 14:41

To demonstrate what I mean please see attached example. Very very strange in my opinion...
You do not have the required permissions to view the files attached to this post.

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 171
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Re: SalJSONDeserializeUDV breaks STRING_Null retrieval

Post by thomas.uttendorfer » 02 May 2019, 16:25

Hi Holger,

we use the function SWinCvtULongToNumber() from cdlli71.dll to test for STRING_Null.
But even with this one we see the same problem as you (tested with TD 7.1.2).

So I think this is a bug. You should open a ticket at OpenText.

Here is my modified sample for you interest:
SalJSONDeserializeBug_tu.zip
Regards Thomas
You do not have the required permissions to view the files attached to this post.
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

Holger
Germany
Posts: 25
Joined: 07 Mar 2018, 13:43
Location: Oberkirch, Germany

Re: SalJSONDeserializeUDV breaks STRING_Null retrieval

Post by Holger » 08 May 2019, 10:00

Hi Thomas,

thank you for your example. We investigated a little bit further before opening the ticket and we found the problem not only exist with STRING_Null.
If you put the strings as binding variables in a SQL statement, the last character gets cut. In our specific case, an "Exists" didn't work as expected. Everything is fine and works btw. if you do a VisStrTrim() on the string variable after it gets filled with SalJSONDeserialiseUDV( ).
So we think OpenText has a problem with the null terminator of the strings or something like that.

We will report it and I will post the TD numer as soon we received one.

Regards,
Holger

Holger
Germany
Posts: 25
Joined: 07 Mar 2018, 13:43
Location: Oberkirch, Germany

Re: SalJSONDeserializeUDV breaks STRING_Null retrieval

Post by Holger » 15 May 2019, 13:04

TD-24518

Regards,
Holger

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 0 guests