1
|
2
|
Scroll through the Controls list and select the PSQL ActiveX Data Source and PSQL Bound Controls check boxes.
|
3
|
Click OK.
|
4
|
By default, the first VAccess control you place on a form is named VAccess1. You can change this name if you want by entering a new name in the Name property.
|
2
|
Find the property you want to change in the Property Pages, the Visual Basic Properties window, or the Code Editor. See Accessing Properties for information on accessing the properties.
|
•
|
DdfPath—This property determines the location of the DDFs (Data Dictionary Files) to be used by the VAccess control. The property must contain a valid drive and path where DDFs are located.
|
•
|
TableName—This property determines which table (data file) of the DDFs is to be used by the VAccess control. The property must be set to a valid table name contained in the DDFs specified in the DdfPath. You can select the table name from the drop down menu.
|
•
|
Location—This property determines which PSQL table is to be used by the VAccess control. It corresponds to the Table Location contained in FILE.DDF. The default for this property is the Table Location for the table specified in the TableName property, but you can give an alternate path to the table if you wish.
|
2
|
Set the DdfPath of the VAccess1 control.
|
3
|
Select a table name from the TableName property’s drop-down menu. The menu contains the table names available in the DDFs you pointed to in Step 2.
|
4
|
When you selected a table name in Step 3, the Location property changed to the .MKD file containing that table.
|
3
|
Click on the Settings tab of the VAccess1 Property Pages dialog box and click on the IndexNumber field. This displays the list of indexes that have been defined for the selected table.
|
4
|
2
|
Set the VAccessName property to the name of the VAccess control and the VAFieldName property to [Index List]. The VAComboBox automatically fills with a list of indexes from the file, and any selections from this list will set the index used by the VAccess control.
|
•
|
If AutoOpen is set to True, the control automatically opens the file when it is loaded at run time based upon the settings of the DdfPath, TableName, and Location properties in the VAccess control. It automatically closes the file when it is unloaded.
|
•
|
If AutoOpen is set to False, the control does not open the file until the Open method is invoked. In addition to being set in the Properties window, the DdfPath, TableName, and Location properties can be set in code prior to the Open. Thus, you can open different files at different times with the same VAccess control or accept user input to choose a file. The Close method closes an open data file.
|
2
|
Click on the Settings tab.
|
3
|
Select or deselect the AutoOpen check box. When the check box is selected, AutoOpen is set to True; when deselected, AutoOpen is set to False.
|
2
|
Set its VAccessName property to the VAccess control you want to use.
|
2
|
Set its VAccessName property to the name of the VAccess control you want to use, and set its VAOperation property to the desired retrieval operation.
|
•
|
Use one of the methods in Table 3. The Get methods use the index specified in the IndexNumber property. The Step methods do not use an index.
|
2
|
Set the VATextBox’s VASearch property to True. This causes the VAccess control to perform a GetGreaterOrEqual method to retrieve matching records as text is entered into the text box.
|
2
|
Select the appropriate index by setting the IndexNumber property.
|
3
|
Use the FieldValue method to populate the index field with the value you want to search. For indexes which use more than one field, be sure to assign a value to each of the fields.
|
4
|
Then perform one of the methods in Table 4 to retrieve the desired record.
|
5
|
Make sure the IndexNumber property is set to the index that corresponds to the field or fields by which the search is done.
|
3
|
Set its VAOperation property to the desired operation. Refer to the VAOperation property in the Property Reference of this manual for a list of possible operations.
|
•
|
If the VACommandButton is used to retrieve and lock a record, set the VALockBias property.
|
2
|
In the Properties window, click the Join button to open the Join Controls dialog box. The left side of the dialog box shows the table of the slave control from which you are joining and the selected index of that table. The right side shows the master control to which you are joining, and the fields available in that control.
|
2
|
If using the Properties window, set the ExtendedOps property to True. If using the Property Pages, click on the Extended Operations tab, select the ExtendedOps check box, and click OK.
|
•
|
Get Next Extended retrieves subsequent records in the current key path order according to the filter conditions specified.
|
•
|
Get Previous Extended retrieves previous records in the current key path order which match the specified filter conditions.
|
•
|
Step Next Extended retrieves subsequent records in the physical order they occur in the file according to the filter conditions specified.
|
•
|
Step Previous Extended retrieves previous records in the physical order they occur in the file according to the specified filter conditions.
|
1
|
Set the VAccess control’s ExtendedOps and AutoMode properties to True to enable extended operations and switch the control into automode.
|
2
|
Set the control’s SelectedFields and SelectedRecords properties to specify the record set you wish to retrieve.
|
3
|
Set the CacheRows property to the maximum number of records you wish to get per retrieval operation.
|
4
|
Set the CancelDialog property to True if you wish to enable the user to cancel the scan before it is finished.
|
•
|
The total amount of data returned by a single extended fetch operation is limited by the size of the data communications buffer used, which is specified in the MaxBufferSize property. This buffer is limited to 64 KB, but this maximum may be lower, depending upon your particular PSQL MicroKernel Database Engine configuration. Specifying too large a value for this property results in Status Code 97, “The data buffer is too small.”
|
•
|
The SelectedFields property determines the size of an individual row of data, which is equal to the sum of the storage lengths of the selected fields plus 6 bytes.
|
•
|
The CacheRows parameter dictates the maximum number of rows to retrieve at a time. The extended fetch methods will use either the value of CacheRows, or a calculated value based on the row size and the MaxBufferSize, whichever is less. If CacheRows is zero, the calculated value will be used.
|
•
|
The SelectedRecords property allows you to retrieve only those records which meet certain criteria. It works in conjunction with the CacheRejectMax property, skipping records which do not meet the search criteria. If you do not specify a value for the CacheRejectMax property, PSQL will use a system-defined value. The record set is returned when one of two conditions are met: the number of rows which matches the selection criteria equals the value of the CacheRows property, or the number of records scanned since the last match exceeds the value of the CacheRejectMax property. The Status property indicates which condition was met.
|
•
|
The Rows property indicates the number of rows returned by the extended fetch operation. Always check the value of this property after an extended fetch, as it is possible for the operation to return a non-zero status (such as end of file), and also return valid data.
|
•
|
The Columns property corresponds to the number of fields specified in the SelectedFields property, or to the number of fields defined for the file if no record selection criteria was specified.
|
•
|
The RowColumnValue method retrieves the field value at a specified row and column position in the extended fetch record set.
|