Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help! VFP 7 broke my VFP 6 code
Message
From
01/10/2001 12:51:50
 
 
To
01/10/2001 12:18:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00562021
Message ID:
00562651
Views:
31
I can answer later (gotta head out now) but I see Matthew confirms this, so I'd say you are correct and that it will do same here.


Sorry

>I think I know what is causing this. In VFP6, if you issue an ALTER TABLE on a cursor with one or more long fieldnames (>10 chars long), the long fieldnames are silently truncated to 10 characters. This happens because in the background ALTER TABLE makes a new free DBF and deletes the original. Because this is a free table, the fieldname lengths are limited to 10 characters. To prevent this silent truncation from happenening in VFP7, we now throw the error "Invalid operation for the cursor" when attempting ALTER TABLE on a cursor with long fieldnames.
>
>Try the following code in VFP6 and VFP7. The field field_name1 is renamed to field_name in VFP6. VFP7 throws the error on the ALTER TABLE command.
>
>CLEAR
>CREATE CURSOR testcur (field_name1 c(8))
>LIST STRUCTURE
>ALTER TABLE testcur ADD COLUMN f2 c(8)
>LIST STRUCTURE
>RETURN
>
>
>Please let me know if you are seeing something different than what I describe above.
>
>Jim Saunders
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform