Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hi Elyse.
>I use the DataEnvironment to open most of my tables. When there is a problem opening one of the tables (i.e.-it doesn't exist), it comes up with a locate screen, but I don't know which file couldn't be opened. Is there a way to trap and display the name of the file that couldn't be opened?
You could open all your tables at application startup using SDT's OpenAllTables method. If it fails on any table, it'll return .F. and you can check SDTMgr.cAlias property to see which table failed, and then handle it appropriately.
Opening all the tables at app startup speeds up form instantiation (even those with private datasessions) since VFP doesn't have to go back to disk to open the table every time a form is run.
Doug
Précédent
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