Kbase P30966: What is the -checkwidth parameter for?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/10/2010 |
|
Status: Unverified
GOAL:
What is the -checkwidth parameter for?
GOAL:
How to use the -checkwidth parameter?
GOAL:
How to prevent Progress from storing data that is longer than its allowed sql-width into the DB?
GOAL:
How to restrict data to the length of the sql width with ABL client
GOAL:
How to restrict data to the length of the sql width with 4GL client
FACT(s) (Environment):
Progress 9.1D
OpenEdge 10.x
All Supported Operating Systems
FIX:
The -checkwidth startup parameter was introduced in Progress version 9.1D06. It allows Progress to compare the width of the data in a character, decimal, or raw field with the value of the _width property for that particular field. The _width property of a field represents the maximum width of the data allowed in that specific field for the SQL engine. By default, this is ignored by Progress because Progress is a variable length database.
The fact the Progress client ignores this value means that an SQL engine cannot get a record that is greater than the _width field from a Progress database. When attempting to do so, it generates an error message and fails.
With this new startup parameter, the Progress client can be set to act as it always has or to generate a warning or an error message if the size of the data being stored into a field in the database is larger than the field?s _width. The second case, generating the error message, is consistent with how SQL currently handles the _width value. The comparison will only happen when the field is being updated and not when the data is being extracted.
When enabling the -checkwidth parameter, the 4GL client that is connected to the database can be kept from entering data larger than a field's _width value. Thus, if all clients connect to a Progress database with this parameter enabled, then an SQL engine connecting to the same database will not attempt to retrieve columns that have values exceeding their max length or precision because they will not exist.
Currently, the -checkwidth parameter can be set to three different modes. Passing an integer value as an argument for the parameter sets its mode:
<progress-client>.exe ?checkwidth n
where "n" can be one of the following values:
0 - keep the current behavior, storing beyond the _width (i.e. ignores _width value).
1 - keep the current behavior generating a warning message before storing data larger than _width.
2 - raise an error and do not store anything if the data is too long.