Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select statement to get table names in .dbc via ODBC
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00165543
Message ID:
00165635
Views:
22
>I have a VFP database (.dbc) set up in the Contol Panel's ODBC data sources. Is there a select statement I can send to the ODBC data source to retrieve the table names within the database (.dbc)?

Try this:

lnHandle=sqlconnect("You_Connection_Name")
=SQLTABLES(lnHandle,"Table", "CrsTables")

I have a VFP ODBC connection to another VFP Database, and this works for me -- returns 1 record for each table in the DBC. Works for views in the DBC as well, just substitute View for Table. See VFP help for SQLTables() and SQLConnect() function parameters.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform