Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set database anomoly
Message
De
01/06/2018 12:28:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Set database anomoly
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01660504
Message ID:
01660504
Vues:
68
Hi all,

This is weird as it has not shown up in the framework I use before. Two forms based on same class and one works fine, the other has a problem at a certain part in the code.

For the 2nd one, it fails to open a local view programmatically because it turns out that no database is set at the point when this code runs i.e. SET("Database") returns blank. On the original form, in the code in about the same spot, the database is open and set; but in the 2nd form, it is not. I can work around it by inserting a SET DATABASE TO xx command but I cannot figure out what is causing the database to be set to blank.

When I first open each form and go to the debug window, they are both set correctly. I tried setting a breakpoint for when this changes but it fires so often in the debugger I gave up.

Question: are there any commands or situations where the database is implicitly closed? much like the database is implicitly set to the correct database when you issue OPEN DATABASE xx.

Also, is there any other way to track all the changes to SET("Database") other than the debugger?

Thanks,
Albert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform