You can perform a variety of tasks to manage views, similar to those that you perform to manage tables, table fields, and table records, for example:
Specify captions for view fields.
Add comments to views and view fields.
Specify default values for view fields.
Create validation rules for fields and records.
Create indexes on view fields using the INDEX command.
Note: Unlike table indexes, indexes you create on views are not stored and are removed when you close a view. Consider the size of the view's result set before creating an index. Indexing a large result set might decrease performance of your view.
Create temporary relationships between views or tables and views using the SET RELATION command.
Tip: To increase performance when using the SET RELATION command, make the view the parent and the table the child in the relationship. Note: Making the table the child is more efficient because the structural index of the table is constantly maintained, quickly accessed, and can be used by the data environment to order the records. In comparison, the index on the view must be rebuilt each time the view is activated and takes more time than the index on the table. An index on a view is not part of the view definition; therefore, if you use a data environment, the view cannot be the child because the index on the child must exist as part of the definition.
In This Section
- Opening Views
- Discusses opening views.
- How to: Edit Views
- Describes how to open views for editing and other management tasks.
- How to: Rename Views (Visual FoxPro)
- Describes how to change the names of views.
- How to: Open Views in Work Areas
- Describes how to open views in work areas.
- Setting View and Connection Properties
- Provides an overview about setting properties for views and connections for remote views.
- How to: Set Field Properties for Views
- Describes how to set various properties for fields in views.
- How to: Add Comments to Views
- Describes how to add descriptions for views.
- How to: Create Default Values for View Fields
- Describes how to specify default values for view fields.
- How to: Create Validation Rules for Views
- Describes how to create validation rules for view fields and records.
- How to: Set Timeout Intervals for Connections
- Describes how to set timeout values for the connection to the remote server if you need to adjust how Visual FoxPro interacts with the server.
- How to: View and Edit SQL Statements for Views
- Describes how to display and edit the SQL SELECT statement and properties generated for views.
- How to: Create Views with Stored SQL Statements
- Describes how to store the SQL SELECT statement that Visual FoxPro builds for views and use them to create views programmatically.
- How to: Delete Views
- Describes how to delete views when you are finished working with them.