ADO » DataControl » Refresh


Refreshes the data from the data source, discards any unsaved changes, and positions the Recordset object at the first record.

The Refresh method updates (refreshes) the results you obtained from a query by resubmitting the query to the data source. This can be very useful when working with a data source that can be updated at any time by other users. This method ensures that you have the latest possible results.

The previous Recordset is released. Since all unsaved changes are discarded, you may wish to save all pending changes before calling Refresh. The current record becomes the first record of the new, returned Recordset.

You can create a form on a Web page to input values for the various DataControl properties and use Request.Form( ) to assign the values.


objDC.ExecuteOptions = Request.Form("ExecuteOptions")
objDC.FetchOptions = Request.Form("FetchOptions")
objDC.InternetTimeout = Request.Form("InternetTimeout")
objDC.Server = Request.Form("Server.Value")
objDC.SourceRecordset = Request.Form("SourceRecordset")
objDC.SQL = Request.Form("SQL")
objDC.URL = Request.Form("URL")
objDC.Connect = Request.Form("Connect")

See Also: