Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long field name bug
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01171727
Message ID:
01172212
Views:
12
>>>
>>>CREATE CURSOR test (long_field_name c(1))
>>>
>>>ALTER table DBF("test") add shortf c(1)
>>>
>>
>>The second line won't be of any help here, as I found out earlier today.
>>
>>Perhaps you implied to say that ALTER TABLE does not deal with cursors. However, it does alter a cursor also. The next command will work:
>>
>>
CREATE CURSOR test (shortf c(1))
>>
>>ALTER table test alter column shortf c(2)
>
>Actually, the second line in my example will work fine IF the cursor has a disk presence. The problem is that VFP won't write the cursor to disk until it has to, otherwise it will keep it in RAM and there is no DBF file.

And then the funny and good thing is that [ALTER table test alter column shortf c(2)] will also do the job if the cursor has no disk presence yet.

Talking about dbf(alias())... I'm of opinion that a cursor should ALWAYS have the physical representation in the tmp-map. It is now indeed only created after some (how many???) records were added. This creates a condition of uncertainty for the developer. I think there are a lot of places in our code where we assume the existence. One day such a place may cause an error. Who's fault is that then? I think it's essentially the fault of the developers of vfp. So, I'm not pointing to a bug (because the behavior is actually documented), but this is surely an item for the wishlist!
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform