Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UT reported bugs -a compendium (almost)
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00644341
Message ID:
00782448
Views:
12
Hi David,

I agree that it's a bug that VFP silently ignores second filed ('check'). If you have to, you can get around this bug by enclosing filed name in quotes.
CREATE CURSOR curTest (test C(10), "check" C(10))
>I just found what I can only describe as a bug in the CREATE CURSOR command.
>
>This bug is in all versions of VFP that I tested (3.0, 6.0SP5, 7.0, 8.0 - I don't have 5.0 installed anymore).
>
>CREATE CURSOR curTest (test C(10), check C(10))
>BROWSE
>
>Results: Only the "test" field shows up, the "check" field is not created.
>
>CREATE CURSOR curTest (check C(10)
>
>Results: Error - No fields found to process.
>
>I guess that since "CHECK" is a reserved word in the CREATE CURSOR command that it is causing problems as a field name. This also happens with "UNIQUE". Adding a field named "unique" causes a Syntax Error.
>
>I usually try to avoid using field names that may be confused with a reserved word but this one caught me.
>
>Other reserved words in the CREATE CURSOR command are ok for use as field names (NULL, NOT, ERROR, DEFAULT, COLLATE, NOCPTRANS, AUTOINC, NEXTVALUE, STEP - all ok).
>
>This is asily avoidable but a gotcha none the less.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform