Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FAQ re: setting database path at run-time...another way?
Message
 
À
02/09/1999 21:07:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00260939
Message ID:
00260949
Vues:
16
Also make sure you put the code into the load event not the init event of the form.

>The FAQ entitled: 'How do I ensure my forms are pointing to the correct tables' dated 24/06/99 provides a means for modifying the path of a database that is declared in the DE. Works great!
>
>But..I recently tried to use one of MS's canned forms (the simple one you get when use the form wizard) and the form broke when I tried to modify the database path in the manner cited above.
>
>It broke because the init of one of the form's controls (the pushbuttons) tries to access a cursor ... which hasn't been created yet since, as per the cited ref, files are not opened until the form's init fires.
>
>(...thus illustrating, among other things, the pitfalls of mucking with precanned classes...)
>
>I discovered that I could mitigate this problem by allowing the DE to automatically open the files, and instead, modify the database path of the cursor in the DE's beforeopentables event.
>
>Is this another acceptable means for achieving the same result as in the cited FAQ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform