all true, but in nitpicking mode I might argue that your code is vulnerable against possibly pre-existing alias MyData ;-)
>No. 0 as a workarea means "next work area not currently in use". So, if you issued SELECT 0 instead of SELECT MyData, you would be in a work area that had no table, so the following COPY command would fail.
>
>>thanks al - i think it should be select 0
>>typo - it works great though - problem resolved.
>>tnx
>>k
>>>>.i have added a memo field to my database. when i copy the database to another mydata.dbf to my2data.dbf the memo fields are not automatically copied. it looks like they are stored in a separate file with ftp extension. any idea how i can copy that to the new database so it tags along with.
>>>>
>>>>i get an error message that memo file is missing or invalid when i try to open the new database.
>>>
>>>
>>>USE MyData IN 0
>>>SELECT MyData
>>>COPY TO My2Data ALL WITH PRODUCTION
>>>* WITH PRODUCTION / WITH CDX also copies any associated .CDX index file, if present
>>>