Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Annoying behaviour when adding a field to a table...
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00413032
Message ID:
00413049
Views:
35
Trey,

I was just reading that in the Online documents, thanks for the help, I guess that's just what I'll have to do.

Thanks again.

- Aaron.

>>Everyone,
>>
>>I'm generating a cursor using "CREATE CURSOR < Name > FROM ARRAY < Array >", but further down the line I want to "Add" a column to the Table. To do this I use "ALTER TABLE < Name > ADD COLUMN < Name > < Type >".
>>
>>The problem is, some of the columns in the table I originally created have names longer than 10 chars and when I add the column with the "ALTER TABLE" command it truncates the other field names to be 10 chars also.
>>
>>How can I add my column and avoid truncating the existing field names?
>>
>>Thanks,
>>
>>- Aaron.
>
>You can't. Once you start ALTERing a cursor, you use its free table (the TMP file returned by DBF()), which can't have field names >10 chars in length.
>
>Assuming this array came from an AFIELDS() call, I would recommend just adding the new fields to the array before creating the cursor.
Aaron Young
Red Wing Software, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform