Kbase P12765: How to override the database format in a dynamic query when
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  18/03/2003 |
|
Status: Unverified
GOAL:
How to override the database format in a dynamic query when the data length is longer than the format.
GOAL:
This will avoid truncation of the data when it is output.
FACT(s) (Environment):
Progress 9.1x
CAUSE:
By default a dynamic query uses the format defined for a field in the database. If the stored data is longer than the format, then the query output value will be truncated.
FIX:
Change the format of the buffer field in he following way:
DEF VAR len AS INTEGER NO-UNDO.
DEF VAR lenstring AS CHARACTER NO-UNDO.
len = LENGTH(hfield:BUFFER-VALUE).
lenstring = "X(" + STRING(len) + ")".
hfield:FORMAT = lenstring.
Any output will now use a format equal to the data value length.