Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting Records out of Access Tables
Message
From
28/10/2004 13:33:24
 
 
To
28/10/2004 12:48:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00954660
Message ID:
00955389
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform