Kbase P102681: Is it possible to control the number of characters allowed to populate a field using a parameter?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/7/2009 |
|
Status: Verified
GOAL:
Is it possible to control the number of characters allowed to populate a field using a parameter?
GOAL:
Is it possible to change the behavior of Progress that allows a variable length data field?
GOAL:
Is it possible to make the variable length field imposed by Progress behave like SQL's _width field that sets a maximum length
FACT(s) (Environment):
Progress 9.1E
OpenEdge 10.x
FIX:
A new client session startup parameter was introduced in 9.1E that allows us to limit the number of characters in the field based on the _width field value.
Syntax for UNIX and Windows:
-checkwidth n
The check-width mode.
Use Check Width (-checkwidth) to specify whether Progress compares CHARACTER, DECIMAL, and RAW field data against the metaschema _width field value before updating a database record. The _width field value specifies the maximum width of the data allowed in a field.
Progress allows for variable length data; SQL does not. This startup parameter lets you impose the SQL requirement that data cannot exceed the size specified in the _width field.
The valid check-width modes are:
0 ? Ignore the _width field value and store the data. This is the default mode.
1 ? Store the data, and generate a warning message if the data exceeds the size specified in the _width field.
2 ? Do not store data that exceeds the size specified in the _width field, and generate an error. Specify this mode if you want Progress to behave like SQL.
note: The _width field value for array fields is the size of all array elements after Progress converts the array element values to CHARACTER. This means that even with the -checkwidth startup parameter enabled, array fields can still surpass the _width field value.