Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with multiple databases open
Message
De
23/10/2000 12:50:50
 
 
À
21/10/2000 21:14:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00432551
Message ID:
00432979
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform