Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DATA DRIVEN CONTROL
Message
De
01/06/1999 16:51:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
DATA DRIVEN CONTROL
Divers
Thread ID:
00225111
Message ID:
00225111
Vues:
55
I have the following code in the init. property of a label

NODEFAULT
THIS.CAPTION=DBGETPROP("SUPPLIERS.SUPPLIERNAME","FIELD","CAPTION")
DODEFAULT()

This sets the label to the caption of the field, thus ensuring that changes to the database are automatically updated.


It works fine -- as long as I add the command:

OPEN DATABASE "INVENTORY CONTROL"

to the init event of the data session of the form.

Given that the data session already creates a cursor against the supplier table, why does it not know that the database is open?

I always thought that when you open a table that is in a dbc, the database is opened automatically.

BTW the actual code is more general, since I'm developing some data-aware classes. I just developed this hard-coded example for diagnostic purposes, and am hoping to find a less kludgy solution.

Thanks

Gar
Thanks

Gar W. Lipow
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform