Share via


Reset Method (RDS)

Executes the sort or filter on a client-side Recordset based on the specified sort and filter properties.

Syntax


DataControl.Reset(value)

Parameters

DataControl

An object variable that represents an RDS.DataControl object.

value

Optional. A Boolean value that is True (default) if you want to filter on the current "filtered" rowset. False indicates that you filter on the original rowset, removing any previous filter options.

Remarks

The SortColumn, SortDirection, FilterValue, FilterCriterion, and FilterColumn properties provide sorting and filtering functionality on the client-side cache. The sorting functionality orders records by values from one column. The filtering functionality displays a subset of records based on a find criteria, while the full Recordset is maintained in the cache. The Reset method will execute the criteria and replace the current Recordset with an updatable Recordset.

If there are changes to the original data that haven't yet been submitted, the Reset method will fail. First, use the SubmitChanges method to save any changes in a read/write Recordset, and then use the Reset method to sort or filter the records.

If you want to perform more than one filter on your rowset, you can use the optional Boolean argument with the Reset method. The following example shows how to do this:


ADC.SQL = "Select au_lname from authors"
ADC.Refresh    ' Get the new rowset.

ADC.FilterColumn = "au_lname"
ADC.FilterCriterion = "<"
ADC.FilterValue = "'M'"
ADC.Reset         ' Rowset now has all Last Names < "M".

ADC.FilterCriterion = ">"
ADC.FilterValue = "'F'"
' Passing True is not necessary, because it is the 
' default filter on the current "filtered" rowset.
ADC.Reset(TRUE)     ' Rowset now has all Last 
                    ' Names < "M" and > "F".

ADC.FilterCriterion = ">"
ADC.FilterValue = "'T'"
' Filter on the original rowset, throwing out the
' previous filter options.
ADC.Reset(FALSE)   ' Rowset now has all Last Names > "T".

See Also

VBScript Example

SubmitChanges Method (RDS)

Applies To: DataControl Object (RDS)