PRB: Default Values Not Written on Local Views (131386)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q131386 SYMPTOMS
When a table in a database contains default values and a blank record is
appended to a local view based on that table, the defaults are not input
into the fields automatically. If the view is closed and reopened, the
default values are displayed.
CAUSE
The default clause in the database is part of the table definition. It is
not defined when the local view is created. When the view is closed, the
data is updated in the table, and default values are written.
RESOLUTION
You can use the DBSETPROP() function to attach a default value to a field
in a view. This will automatically insert a default value when a new record
is appended. Use the following syntax to set a default value:
=DBSETPROP('<View.Fieldname>','FIELD','DefaultValue', '<value>')
For more information about the DBSETPROP() function, search for DBSETPROP()
in the Visual FoxPro Help menu.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | kbcode KB131386 |
---|
|