Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically open a list of tables
Message
From
02/06/2004 18:10:36
 
 
To
02/06/2004 17:45:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00909412
Message ID:
00909418
Views:
8
>I have a table with a field called tablename which contains name of table that I have I want to scan the table and open all the tables for example
>use &tablename
>and I m getting a error &tablename does not exist
>can anyone help me how to do such a thing


Sergey's example is good. I would only add a check to see if the file exists.
I don't know if you can always assume the file indicated in your tablename field really exists on disk (or even that it is in the path).
if file(lctablename + ".dbf")
  * do the processing as Sergey indicated
else
  * file not found
endif


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform