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