Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Set database anomoly
Versions des environnements
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Virtual environment:
VMWare
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement