Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 command execution sequence
Message
 
 
To
24/07/2000 10:00:03
Errol Saldanha
Muscular Dystrophy Canada
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00396130
Message ID:
00396143
Views:
10
>Hello,
>I have a program which does the following:
> For each table name in an array containing table names
> copy structure of table from database "X" to database "Y"
> alter table Y!table to add fields
>The program fails randomly, usually with the message that the memo
>file on the Y table is missing or invalid.
>I've worked around the problem with 5 second waits after the commands.
>It's as if VFP6 is executing the next command before completing the current one. Am I insane...what is going on.
>
>Thanks
>
>Errol Saldanha

I think you should use a combination of AFIELDS() and CREATE TABLE mytable FROM ARRAY ... to do this. Put something like the following in your loop:

mytable = laTables(i, 1)
set database to X
use "x!" + mytable
afields(laFields, mytable)
use
set database to Y
create table (mytable) from array laFields
alter table ...
use
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform