Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from many tables
Message
De
08/01/2006 10:10:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/01/2006 03:47:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01084362
Message ID:
01084513
Vues:
8
Eliminate the PACK. Just use SET DELETED ON to hide deleted records.

>hi,
>i try to make pack only at one pc, i get error message "File must be opened exclusively "
>
>SET EXCLUSIVE off
>for x=1 to 13
>  delete FROM ('month'+ltrim(str(x))+'2004') where no=1231
>  pack    &&File must be opened exclusively
>endfor
>
>
>thanks
>>>>
>>>>for x=1 to 1
>>>>  use (trim(str(x,2))+'2005')
>>>>  delete for no=1151
>>>>endfor
>>>
>>>trim() will only trim to the right, IIRC. Here you need ltrim() or alltrim(); or simply convert the number with trans(x).
>>
>>Yes, I ment to use alltrim, but I simply forgot. I also thought about the transform function, but on top of my head I was not sure if it defaulted to trim the result or not, but it sure does. So your solution is the simplest in this case.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform