Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem opening views
Message
De
17/03/2007 10:29:14
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Problem opening views
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01204975
Message ID:
01204975
Vues:
63
Consider this code...

* In the load event of form1
SELECT 0
USE MyView

* In the load event of form2 (using same datatsession as form1)
SELECT 0
USE MyView

Because form1 and form2 share the same datasession, I would expect an error to be raised when opening MyView the second time, but it doesn't, the view is opened in the next available area with a single-letter alias which I do not know and have no control over.

If MyView was a .dbf file, I get the error "File is in use" which is what I would expect. As these forms have to share the same DS, and I don't know which form will be launched first, I guess the safe way is to always check if the view is open first (or always open a view with the ALIAS clause). But the question still remains - why doesn't the error occur with views?

Any help would be appreciated.

Alan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform