![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Ok... Lets say we have free tables in two different directories. Directories "DirA" and "DirB". The tables in the two directories have the same names but different structure. How can I work with the tables in these two directories? I know the obvious thing is to use the USE statement and an alias. But I was wondering if there was a way to use Fox's object model to get around this. I've been reading the book "Build Your Own Framework with Visual FoxPro" and the author writes about Data Environments and Sessions. I don't quite understand it as I'm pretty new to fox, but I think you can create a data environment object and then a data session within that environment. This leads me to believe that for my little scenario above, I could create a data environment object for each of my directories. Within each DE, specify a path to the appropriate directory and then work with the tables. I'n not quite sure if this is possible nor exactly where to start with code. (Would I create a custom object inheriting from the DE class? How would I associate data tables/sessions to the DE?) Any thoughts? Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |