Hi Mike,
Your COPY TO won't give you all the meta data, which is what you wanted in the first place. When you already have a copy of the system the meta data is already there, you are just updating the data.
HTH
Peter Cushing IT Department WHISPERING SMITH
On 28/02/2019 21:37, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2019-02-28 04:43, Peter Cushing wrote:
On 27/02/2019 17:22, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I can easily do something like this:
CREATE DATABASE C:\Backup\MyDBC.dbc OPEN DATABASE C:\Production\MyDBC.dbc liNumTables = adbobjects(laTables,'TABLE') for ii = 1 to liNumTables lcFile = forceext("C:\BACKUP" + laTables[ii],'dbf') use laTables[ii] copy to (lcFile) database C:\Backup\MyDBC.dbc with cdx use endfor
...and that would get me a copy of all of the tables with their indexes. Great. But what's the easiest way to get all of the DBC meta-data into that new Backup database copy? I can't USE the MyDBC.dbc and do a COPY TO as that only makes the result a DBF and FPT.
An easy way to get a copy of the data is to have a copy of all the data in another folder, then using your loop above, zap each table and append from the live data. We use it here as a rough and ready backup during the day, while people are in the system. Your copy then has all the same meta data as the original.
Hi Peter,
I see no difference between my COPY TO <the backup folder table> versus doing an APPEND FROM <Production table> from my backup table. ???
Am I mistaken?
tia, --Mike
[excessive quoting removed by server]