Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One Day
Message
From
18/03/2004 05:58:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/03/2004 01:53:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00878450
Message ID:
00887432
Views:
13
>Good Morning
>
>Thank you very much,
>
>YOU MEAN A PROGRAM LIKE THIS
>
>SELECT 1
>USE AAA EXCL
>PACK
>USE
>
>SELECT 2
>USE BBB EXCL
>PACK
>USE
>.
>......ETC

Yes, more or less. To use less commands:
clear all
close database all
set exclusive on

use aaa
pack
use bbb
pack
use ccc
pack
use
Note that:

1) You don't need to switch to different areas, since you only need one table at a time.

2) By using only one area, you only need to close the last table. The first table is closed when you open the second one, etc.

3) By using SET EXCLUSIVE ON, you don't need to open each individual table with the EXCLUSIVE option.

Also, if you have all the tables in the same directory (folder), you can use adir() to get a list of tables, more or less like this:
set exclusive on
for i = 1 to adir(laTableList, "*.dbf")
  use (laTableList(i, 1))
  pack
next
use
adir() creates an array of files; the first column of this array contains the file names.

>
>HOW DO YOU TIME THE PROGRAM TO WORK AT SPECIFEC TIME i.e MID NIGHT

Use the Windows Task Scheduler. http://www.iopus.com/guides/winscheduler.htm shows you an example. A Google search for "Windows Task Scheduler" should gives you additional examples.
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