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:
00413050
Views:
22
>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.

Just as a workaround (if it is not going against your application methodology) you may try to CREATE TABLE instead of CREATE CURSOR, so it will be created with long fieldnames. If you don't want to touch existing database, you may create a temporary DBC for it.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform