|



Extended operations allows your application to retrieve a number of records at a time from a Btrieve server, and performs limited server-side filtering based on values of fields. Extended operations can dramatically increase the performance of some record retrieval operations.
Click the Extended Operations Properties tab. To activate Extended Operations, check the ExtendedOps check box. To turn off Extended Operations, clear the ExtendedOps check box.

Add code for an initial query, if desired.
Setting this property to True causes the VAccess control to perform a GetGreaterOrEqual method using the value in the text box for the first segment of the index specified by the IndexNumber property of the data source each time the text changes. The setting of the VAFieldName property is ignored.

Setting this property False prevents the currently selected list box item from automatically scrolling to the top of the list if the list is used as an auto-fill record list (VARecordList = True)
The default behavior of the record list VAList (VARecordList = True) is to keep the current record as the first item in the list box, whether or not the positioning was changed by the list box or by other means, such as a scroll bar or a GetEqual command.
If VAAutoScroll is False, this default behavior is defeated and the VAList moves the current record to the top of the list only when positioning is changed by a source other than the list box itself. For example, clicking on an item in the list box will reposition the VAccess control, but will not change the items in the list box.
Setting this property True changes the mode of the list box or combo box control from a field-bound control to a record browser.
The VARecordList property causes the list control to be filled with as many records as it can hold. The top item of the list is the current record (unless the VAAutoScroll property is set to False, in which case the selected list item represents the current record).
When VARecordList = True, several added features are available and may be accessed at design time via buttons on the property page. The VAFieldName and VAFormat properties, which are limited to one entry when the control is in field-bound mode (when the VARecordList property is False), can contain a list of fields and formats, respectively, separated by semicolons. In addition, the VAAutoScroll and ColumnWidth properties become active.
To select a single field to display in the VAList:
To display multiple fields in the VAList:
Or:
The Join property of the VAccess control allows you to specify that two files be linked by a key value, such that any changes in the record positioning of the first (master) file will also affect the records retrieved from the second (slave) file. The Join property provides a simple mechanism for browsing a relational database.
The joined fields in the slave control must be index fields and must contain the same raw data as their corresponding fields in the master control. The fields in the master control do not have to be indexes. The IndexNumber property of the slave control must remain set to the index involved in the join or the join will be broken.
One-to-one, many-to-one, and one-to-many joins are all supported. Note that a one-to-many relationship is most effective if the ExtendedOps property of the slave VAccess control is set to True. In this case, the slave control automatically retrieves all records which match the key value in the master control, and makes the field data available through its RowColumnValue property. The data can be displayed in a VAListBox in record list mode by setting its VAccessName property to the name of the slave control and its VAFieldName property to the fields to be displayed. Set the Join property of the slave control by completing the following steps.
|
Chapter contents
Prev topic: Advanced Pervasive.SQL Tutorials Using Visual Basic
|