Yes, but for tool-grade code I'd have to charge 4x the rate I usually charge on this forum :)
>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
>>>>
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up