Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to select..sql- append from in a loop from dir to di
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01084465
Message ID:
01084473
Vues:
10
Hi Sergey,
it works fine :) i've added some codes to yours as my need like below
Close Databases All
Local LcFrom,Lcto,OldPath
LcOldPath = Sys(5)+Curdir()
LcFrom = "c:\soykan\mysoftware\emin_elk\data03\" &&thisform.txtFrom.value
Lcto = "c:\soykan\mysoftware\emin_elk\testDb\" &&thisform.txtTo.value

Set Path To Data &&audit tables and params folder &&must set path for log update

Open Database (m.LcFrom)+ 'Data1.dbc'
Do Home() + 'tools\gendbc\gendbc.prg' With (m.Lcto) + 'Make_Empty_DB.prg'

Close All
Cd (m.Lcto)
Do Make_Empty_DB.prg
Close All
Cd (m.LcOldPath)

Wait Window "DataBase and Tables Has Been Created..." Nowait

Local LcOldDir,LcNewDir,LcTable
LcOldDir = m.LcFrom &&ADDBS("...")
LcNewDir = m.Lcto &&ADDBS("...")
For i=1 To Adir(laTableList, m.LcNewDir + "*.dbf")
	LcTable = laTableList[i,1]
	Wait Window " Old " + m.LcTable +" Records Transferring To The New " + m.LcTable Nowait
	Use (m.LcNewDir + m.LcTable) Exclusive
	Append From (m.LcOldDir + m.LcTable)
	Use
Endfor

Wait Window "Old Records Has Been Moved To New DataSet..." Nowait

Close All
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform