Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting query text via ADO in VFP
Message
From
08/09/2006 09:20:36
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01151362
Message ID:
01152238
Views:
30
Hi

I find automating Access very limiting, but you can do (nearly) everything with ADOX: this should oputput the names and SQL of stored queries. (ADOX requires a reasonably modern MDB version, so you may need to convert a copy of your MDB)
oDB = crea("adox.catalog")
cMDB = "c:\access\db.mdb"
cConnect = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + cMDB + ";PERSIST SECURITY INFO=FALSE"
oDB.ActiveConnection = cConnect

for each oQuery in oDB.Views
	? oQuery.Name
	? oQuery.Command.CommandText
next
Previous
Reply
Map
View

Click here to load this message in the networking platform