Author: Peter Cushing
Posted: 2019-02-28 at 03:43:39
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.
Peter
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR.
Tel:0161 831 3700
Fax:0161 831 3715
London Office: 101 St. Martin's Lane,London, WC2N 4AZ Tel:0207 299 7960
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/ceec749d-28b9-1502-45bd-6796cdf6a135@whisperingsmith.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.