PDA

View Full Version : [FIXED] vvFormat_toJSON() and integer data


NickT
07-24-2008, 12:04 PM
Hi,

I’m trying to write a simple Valence application based on Demo03, i.e. loading a read-only grid. It is partially working – results are being loaded into the grid – but two of the fields in the database file are defined as integer/binary and these fields are not being populated in the grid. When I debug my program I can see that the correct values are in the data structure that I am passing into vvFormat_toJSON(), but the output that is produced does not contain the values for the integer fields.

The fields in the file that I am processing are defined as follows:
NAMEUC VARCHAR(256),
REFNO INTEGER,
DESC CHARACTER(50),
PATHINFO VARCHAR(256),
AUTHENT CHARACTER,
TIMEOUT SMALLINT,
APPL CHARACTER,
TRCD CHARACTER(3),
STATUS CHARACTER
The following is an extract from the generated JSON.
{
"NAMEUC":"CLAIMSMOTORPOLICYFETCH",
"REFNO":"",
"DESC":"ClaimsMotorPolicyFetch",
"PATHINFO":"ClaimsMotorPolicyFetch",
"AUTHENT":"Y",
"TIMEOUT":"",
"APPL":"S",
"TRCD":"CPF",
"STATUS":"1"
}
Looking at the Valence documentation for vvFormat_toJSON() I can’t see any mention of integer data. Is this a Valence restriction, or am I doing something wrong?

richard.milone
07-24-2008, 01:20 PM
Hi NickT, thanks for your question. We set up your example on our test system and have indeed identified this as a bug in the formatting procedure for integer/binary field processing. I'm going to move this thread to the Bugs area. The CNX development team is working on a fix now. We'll probably have it ready by tomorrow (Friday). We'll post again as soon as it's ready for download.

richard.milone
07-28-2008, 01:42 AM
Hi NickT, this issue has been fixed as of version 1_1_20080727_0. Visit http://www.cnxcorp.com/valence/try/ to download the latest.