Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Add a Field with more than 8 chars long
Message
From
04/11/2003 22:16:16
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00846298
Message ID:
00846304
Views:
19
This message has been marked as the solution to the initial question of the thread.
Esparta,

From VFP7 Help for ALTER TABLE:

ALTER TABLE may not produce consistent results when used with Visual FoxPro cursors created using the CREATE CURSOR command. In particular, you can create a Visual FoxPro cursor with features (long field names, for example) that would normally be available only with tables that are part of a database container. Because ALTER TABLE saves a temporary copy of the cursor, the rules that apply to free-tables then apply, and any features requiring database support are lost or changed in an unpredictable manner. Therefore, as a general rule, you should avoid using ALTER TABLE with Visual FoxPro cursors unless you have tested and understood the outcome.

I think you are stuck.


>I've found an issue in ALTER TABLE command, it doesn't work adding a field with more than 8 chars of long in VFP cursor.
>
>
>CREATE CURSOR Temp (iid int)
>lcField = "cShort"
>**** This Works *******
>ALTER TABLE Temp ADD COLUMN (lcField) int
>lcLongField = "cLongField"
>**** This doesn't work ********
>ALTER TABLE Temp ADD COLUMN (lcLongField) int
>
>
>What can I do? Any work arround?, I've looking for in the Help, but doesn't say anything about this issue.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform