Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATA DRIVEN CONTROL
Message
From
01/06/1999 16:51:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DATA DRIVEN CONTROL
Miscellaneous
Thread ID:
00225111
Message ID:
00225111
Views:
56
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
Next
Reply
Map
View

Click here to load this message in the networking platform