Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from many tables
Message
 
À
08/01/2006 07:57:14
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:
01084506
Vues:
10
>I realize that Mohammed did not understand the meaning of SET RANT ON/OFF, and I have explained it to him. But, since I am one of the people here who has helped Mohammed the most times, I also feel that I am entitled to point him to read the help file. This not a bad suggestion, and it is not ment in a negative way. Personally I have read the help file from A to Z a dozen times, and I learn something new every time.

And I too.
Every time something new !!!

>
>>Here I go again. If you want to provide help, why moan about it? If you don't want to provide help, then don't. As to your SET RANT ON remark, it was completely lost on Mohammed. Its seems he was actually looking for SET RANT ON in the help. Talk about making things more confusing.
>>
>>>SET RANT ON
>>>Do you ever check with help?
>>>SET RANT OFF
>>>
>>>SET EXCLUSIVE ON & Not OFF, OFF is if you must share, to pack it must be ON!!!!!!!!!
>>>
>>>By the way, SET EXCLUSIVE OFF is usually only set ONCE in your program, or in the config.fpw file. In stead you add the EXCLUSIVE keyboard whenever you need it
>>>
>>>
>>>for x=1 to 1
>>>  use ('month'+alltrim(str(x,2))+'2005') EXCLUSIVE
>>>  delete for no=1151
>>>  pack
>>>endfor
>>>And if you need to PACK regularly, you should reconsider your design. PACK should typically be used about once a year to clean up the tables, not daily or weekly!
>>>
>>>>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.
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform