Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening up tables in a datasession
Message
From
04/02/1999 11:03:54
 
 
To
04/02/1999 10:57:54
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00183602
Message ID:
00183888
Views:
15
>Yup they are empty but I am trying to open up different databases with same contents and if I do
>cdataname = dbc()
>dataenvironment.closetables
>dataenvironment.setall = ('database', cdataname, 'cursor')
>dataenvironment.opentables
>
>Then it sets the database property as the current database location and thinks as if freetables in the database also.
>
>Is it possible if I remove the freetables from the data environment and open them up in the private datasession where data environment opens up?
>
>How can I have both of them opened at the same time and also I would be able to switch between databases.
>
>THANKS.

You should not use SetAll, that's the source of your troubles. Using it you re-populate Database property for all DE.cursors and on next opening, naturally enough, VFP thinks that that all of them points to DBC-tables. Instead, you should collect collect all DE members to array (AMEMBERS(,2)), loop through it and reset Database property for not empty ones only.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform