HOWTO: Alter the Properties of a View at Run TimeLast reviewed: January 8, 1998Article ID: Q178760 |
The information in this article applies to:
SUMMARYUnder some circumstances, it may be desirable to modify the properties of a view at run time. This article describes the properties and default property values associated with a view. The sample code illustrates how to create a view and use the DBSETPROP() function to alter the properties of the view programmatically.
MORE INFORMATIONThe properties of a view created with the View Designer are readily accessible from the View Designer. The properties of a view created programmatically, however, use default values unless those values are changed either programmatically or from the View Designer. The default values of a view created programmatically are as follows:
Property Name Default Value
--------------------------------------
SendUpdates .F. (False)
UpdateType 1 SQL Update
WhereType 3 Key and Modified Fields
BatchUpdateCount 1
UseMemoSize 255
FetchSize 100
FetchMemo .T. (True)
MaxRecords -1 (All)
Tables Database Container and Table Name
Comment Null String
Prepared .F. (False)
CompareMemo .T. (True)
FetchAsNeeded .F. (False)
View Field Properties Default Value
-------------------------------------
KeyField .T. (True if the field is a Primary Key)
.F. (False if the field is not a Primary Key)
Updatable .F. (False)
UpdateName Database Container, Table Name And Field Name
DataType Same as source field
Caption Null String
RuleExpression Null String
RuleText Null String
Default Null String
The following View Properties are not available in Visual FoxPro 3.0 or
Visual FoxPro 3.0b:
Prepared CompareMemo FetchAsNeededThe following sample code creates a view based on the Customer table contained in the \Samples\Data subdirectory of the Visual FoxPro installation folder:
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |