>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