DISPLAY problem
Posted in 1994
Topics: Performance & Tuning, Stored Procedures & SPL, Data Types & Schema Design
Currently I'm just putting the finishing touches to a reusable code replacement of the DISPLAY ARRAY statement, which will work on ANY amount of rows, a variable number of columns (up to a defined maximum), include a highlighted bar/query facilities, and the option to add/delete etc. In other words most of the things DISPLAY ARRAY should do anyway :-) The only problem I have come across so far occurs when I call DISPLAY to write the contents of CHAR variable to a form field which has a FORMAT attribute. i.e :- DEFINE tstr CHAR (10) LET tstr = "01-01-1994" DISPLAY tstr TO sc_pick.pick_field2 In the form pick_field2 is defined as :- b9 = FORMONLY.pick_field2 TYPE DATE, FORMAT = "dd-mm-yy"; Calling display with the above code segment, the format attribute is ignored. Is this a bug or a feature?? To get around this I have had to patch my code to look up the column type of each column, then assign the entry in my pick buffer to the a local variable of the appropriate type, before calling display. Doing this has messed up the code and introduced an extra performance overhead, which I would rather do without. Thanks David.