PRB: ALTER COLUMN Clause Applies Only to First SET After ItID: Q135331 The information in this article applies to:
SYMPTOMSThe command below sets the default value for the maxordamt field to 500 and the row level validation rule to maxordamt >10. It does not set the field validation rule to maxordamt >10 as you would expect:
CAUSEThe ALTER TABLE command uses SET CHECK to set field and row level validation. Each SET CHECK that applies to a field must be preceded by ALTER COLUMN to distinguish it from row level validation.
RESOLUTIONFor each property of a field you wish to SET, issue a separate ALTER COLUMN. A separate ALTER COLUMN must also be issued for each DROP. To set the default and the field level validation for the maxordamt, use this command:
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior1. To see the difference between the two commands, open and modify the 2. Issue the first command in the Command window (see the Symptoms section
3. Using the secondary mouse button, click the Customer table in the
4. Select the maxordamt field. The default value is 500, but no validation
5. Click the table properties button. The validation rule has been set.
6. Delete both rules and answer Yes to modify structure. 7. Issue the second command in the Command window (see the Resolution 8. Using the secondary mouse button, click the customer table in the
9. Select the maxordamt field. The default value is 500, and the validation
Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbprb
KBSubcategory: FxprgTable
|
Last Reviewed: August 22, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |