Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot change cursor column name
Message
 
 
To
12/01/2017 10:17:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646543
Message ID:
01646588
Views:
30
>>
>>I am sure that VFP team will fix it in version 10.0 :).
>
>It's not a bug. The structure of cursors can not be modified by a program, tables' can.
>

I am not saying it is a bug or not. But the fact is that you CAN change the structure of a cursor using ALTER TABLE CursorName when the column is not longer than 10 characters.

>>
>>As to why?. I have to populate this cursor from a json I get in Web API. The method I use from West Wind Client Tools requires that the cursor has exactly the same names as the names in the json. And this json has a name "Description". So I have to get it into a cursor with this name and then change it to something less than 10 char. Because I need to save this cursor as a free table to the drive. And when you save a cursor with a field name longer than 10 char, it cuts the name to 10 char (becomes DESCRIPTIO).
>
>If you need field names longer than 10 characters, and require a permanent storage for the data you're getting from the Web Service, then save the data to tables belonging to a database, so that you can define the table with extended field names.

I created a different work around. I don't want to complicate my solution with the database container. Thank you for your suggestion.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform