How to: Add Comments to Fields
You can add descriptions to fields in a database table so it is easier to understand and update. When you select a field from a database table in the Project Manager, the comment text displays in the Description area of the Project Manager window.
To add a comment to a field
Open the database containing the table.
Open the table in the Table Designer.
On the Fields tab, select the field that you want.
In the Field comment box for the field, type the text for the description.
Click OK.
For more information, see Table Designer (Visual FoxPro).
To add a comment to a field programmatically
- Use the DBSETPROP( ) function to set the Comment field property.
For more information, see DBSETPROP( ) Function.
For example, suppose you want to add a description to a unit price field in a table containing items in an order. The following code assigns the text, "Current retail price per unit" to the field:
?DBSETPROP('OrdItems.Price', 'Field', 'Comment', ;
'Current retail price per unit')
See Also
Tasks
How to: Open Databases
How to: Edit Table Structure