Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long field name bug
Message
De
24/11/2006 16:20:56
 
 
À
22/11/2006 11:06:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01171727
Message ID:
01172347
Vues:
23
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform