Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long field name bug
Message
From
23/11/2006 05:26:33
 
 
To
23/11/2006 05:25:28
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:
01172002
Views:
15
>As stated before in this thread, this is NOT a bug. From help on Alter table:
>
>ALTER TABLE might not produce consistent results when used with Visual FoxPro cursors created by the CREATE CURSOR command. In particular, you can create a Visual FoxPro cursor with features, such as long field names, that are normally available only with tables that are part of a database container. ALTER TABLE saves a temporary copy of the cursor, so the rules that apply to free tables also apply, and any features requiring database support are lost or changed in an unpredictable manner. Therefore, you should generally avoid using ALTER TABLE with Visual FoxPro cursors unless you have tested and understood the outcome.
>


NB! JimBo usually knows what he is talking about. :-)

>
>>DBF() function not needed. that sample is working.
>>
>>CREATE CURSOR test (_f_name c(1))
>>
>>ALTER table test add shortf c(1)
>>
>>
>>If you read other messages in this thread you'll see this described as bug long time before.
>>
>>
>>>Metin,
>>>
>>>The first error is telling you that the long field name is invalid for a table that is not on a database.
>>>
>>>The second one is telling you that the name of the dbf is NOT test, create cursor takes an alias as the name and it decides what to name the table. VFP alos does not commit the cursor to disk until necessary so even the following opens the open file dialog;
>>>
>>>
>>>CREATE CURSOR test (long_field_name c(1))
>>>
>>>ALTER table DBF("test") add shortf c(1)
>>>
>>>
>>>I don't think either of these are bugs.
>>>
>>>
>>>>Hi All,
>>>>
>>>>*** this is the first bug *********
>>>>CREATE CURSOR test (shortf c(1))
>>>>
>>>>ALTER table test add long_field_name c(1)
>>>>
>>>>***** this is the second bug *******
>>>>CREATE CURSOR test (long_field_name c(1))
>>>>
>>>>ALTER table test add shortf c(1)
>>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform