Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proc for index/pack tables
Message
From
13/08/2003 11:16:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
13/08/2003 11:07:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00819784
Message ID:
00819790
Views:
10
This message has been marked as the solution to the initial question of the thread.
>Why the following syntax not working?
>
packindex('table1')
>proc packindex
>lparameter cfile
>select cfile
>pack
>reindex
>endproc
>Thank's in advance

One more thing: for safety reasons, after changing to another work area, your functions should usually go back to the previous area. Like this:
packindex('table1')

proc packindex
lparameter cfile
local lnOldArea
lnOldArea = select() && This is the NUMBER of the work area
select (cfile)
pack
reindex
select (lnOldArea)
endproc
Also, I may be wrong, but I believe that if you do a PACK, a REINDEX is no longer necessary.

HTH,

Hilmar.
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform