Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Records out of Access Tables
Message
De
28/10/2004 13:33:24
Gaylen Miller
Leaderware Corporation
Fulton, Illinois, États-Unis
 
 
À
28/10/2004 12:48:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00954660
Message ID:
00955389
Vues:
31
The following loop might help:
PUBLIC oleApp,Openmdb,ExportTxtTo, FileName,ExportType,TableToExport,ExportFileName,pcUnpostedPath,pcExportPath
pcUnpostedPath =  "C:\DATA_TEST\"
pcExportPath = "C:\DATA_TEST_Exported\"
Openmdb = ""
FileName = ""
TableToExport = ""
ExportFileName = ""

Openmdb = (SYS(2000,(pcUnpostedPath + ("*.mdb"))))
DO WHILE ! EMPTY(Openmdb)
	oleApp = CREATEOBJECT("Access.Application")
	oleApp.Visible = .F.
	oleApp.OpenCurrentDatabase(Openmdb, .T.)
	FOR EACH CurrentTable IN oleApp.CurrentData.AllTables
		TableToExport =  CurrentTable.Name
		ExportFileName = (pcExportPath + TableToExport + "." + LEFTC(Openmdb,(AT(".",Openmdb)-1)))
		***Put your code to store names here
		? TableToExport
		
		***
		*My code that does not work:
		*oleApp.DoCmd.TransferText(acExportDelim, "", TableToExport, ExportFileName)
	ENDFOR
	oleApp.Quit

	*-This line selects the next avaliable Transaction file to be imported using this loop.
	Openmdb = (SYS(2000,(pcUnpostedPath + ("*.mdb")),1))
ENDDO
Thanks,
Gaylen Miller
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform