WRITE statement - How the aphanumeric value is mapped to numeric field
Author: jayesh.g.patel@accenture.com (Jayesh82mscit)
Hi All, In the recent time, we faced the problem in which while writing the data into database through WRITE statement, value part was behaving differently. Let me try to explain with little mockup TABLE- PolicyMaster (having 258 fields/columns) SCORE_STEP_UP (Field sequence# 254) - Numeric field with 3 digit length CREATED_BY (Field sequence# 255) - Varchar field with 15 chars length While making a change to Uniface MODEL for one of the another entity (lets say Table#2), unknowingly the sequences of above fields (from table -PolicyMaster) got swapped. We do use the Subversion for source control though not sure if any ways to control to prevent this in future. However while navigating the application, some of the users, system was performing well but for some it wasn't. When observed the patterns and logs, it was concluded that the userid value is mapped to field called SCORE_STEP_UP instead of CREATED_BY and then while hitting to WRITE statement, Uniface was throwing $status -6 Error (Conversion error). Here is the example userids - WRITE statement worked fine (based on the pattern observed) ABCD123 A11111A 123ABCD 111A2222 1111A222 Here is the example userids - WRITE statement failed (based on the pattern observed) A12346 12345A 1234 4321E etc. My query is what is the logic to assign the value our of the above sample user ids into SCORE_STEP_UP field while updating the data into DB (through WRITE statement) specially when this field is NUMERIC field ? I am unable to find further tracing/logs post the WRITE statement in Uniface. Appreciate response or more guidance on this problem. Regards, Jayesh
Ingo