Microsoft Remote Data ServiceMicrosoft Remote Data Service*
*Contents  *Index  *Topic Contents

Reset Method

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

Syntax

DataControl.Reset(value)
PartDescription
DataControlAn object variable that represents an RDS.DataControl object.
valueOptional. 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.

Applies To

RDS.DataControl

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 a read-only recordset.

If there are changes to the original data which 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, as 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".

Example

See Also

Sorting and Filtering, SubmitChanges Method


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.