Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long field name bug
Message
From
24/11/2006 16:20:56
 
 
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:
01172347
Views:
22
Hi Peter,

long time ago I also came across that alter table didn't work always.

For me, mostly 3 solutions work as a workaround :

a) create the cursor as needed in the first place. For example creating the "create cursor" statement by code that can dynamically adjust the needed structure.

b) select ... from mycursor into cursor mycursor
with the fieldlist doing the transform, eg select left(somefield,10) as somefield instead of alter table... somefield C(10). Yes, you can use the same alias name for the query result.

c) afields() -> modifying the array -> create cursor from array -> append data from previous cursor. This time the resulting cursor must be named differnt.

I see you solutions are universal, but copy the records 3 times, instead of once. Of course it depends on how much data is within that cursor. Maybe it was just a fast shot at the problem.

Bye, Olaf.
Previous
Reply
Map
View

Click here to load this message in the networking platform