Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a DBC to another directory
Message
From
11/11/1999 09:08:04
 
 
To
11/11/1999 08:27:21
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00289178
Message ID:
00290037
Views:
15
Hello Jerry,

For change back and forward link in database and tables contained in moved database try this code:

*********************************************************
*
* I write this code for you. Try it.
*
*********************************************************
LOCAL lnDbf
PRIVA aDbfs
LOCAL lcDbfPath
LOCAL lcDbcPath
LOCAL lcDbcNewPath

lcDbfPath='.\Data\'
lcDbcPath='.\Data\'

lcDbcNewPath='.\'

open data (lcDbcPath+'Ucto') excl
set databases to Ucto

lnDbf=adbob(aDbfs, 'TABLE')

*
* YOU MUST SAFETY OFF !!!
*
set safety off

for iDbf=1 to lnDbf
remove table (aDbfs[iDbf])
endfo

set safety on

close data all

*
* MOVE YOUR DATABASES
*
copy file (lcDbcPath+'UCTO.DBC') to (lcDbcNewPath+'UCTO.DBC')
copy file (lcDbcPath+'UCTO.DCT') to (lcDbcNewPath+'UCTO.DCT')
copy file (lcDbcPath+'UCTO.DCX') to (lcDbcNewPath+'UCTO.DCX')

dele file (lcDbcPath+'UCTO.DBC')
dele file (lcDbcPath+'UCTO.DCT')
dele file (lcDbcPath+'UCTO.DCX')


*
* NEW PATH TO DATABASES
*
open data (lcDbcNewPath+'Ucto') excl
set databases to Ucto

for iDbf=1 to lnDbf
add table (lcDbfPath+aDbfs[iDbf])
endfo

*
* CLOSE ANY USED TABLE CONTAINED IN OPENED DATABASES
*
close table

*
* REMOVE UNUSED RECORDS IN DATABASES
*
pack data

close data
*********************************************************

Hi Roman
Previous
Reply
Map
View

Click here to load this message in the networking platform