Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with multiple databases open
Message
From
23/10/2000 12:50:50
 
 
To
21/10/2000 21:14:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00432551
Message ID:
00432979
Views:
23
Hi Dan.

>The problem is that I am attempting to use "Set Database To" but it appears that the "Set Database To" is not respecting the data session. There are times that I am setting Database to a database in another data session.

The problem with SET DATABASE TO when you have multiple copies of the same named DBC open is that unless you specify a path, it'll select the one that was opened last, regardless of the datasession. For example:
set datasession to 2
open database \TEST1\TESTDATA
set datasession to 3
open database \TEST2\TESTDATA
set datasession to 2
set database to TESTDATA
? dbc() && shows \TEST2\TESTDATA
(This code won't run as is, since it expects these datasessions already exist, but shows the problem).

The solution is to specify the complete path to the DBC in the SET DATABASE command ie. SET DATABASE TO \TEST1\TESTDATA.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform