Click or drag to resize

Refresh Function

X#
-- todo --
Refreshes data in an updatable SQL remote or local view, or CursorAdapter cursor.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION Refresh(
	nRecords,
	nRecordOffset,
	uArea
) AS LONG CLIPPER
Request Example View Source

Parameters

nRecords (Optional)
Type: Usual
Specifies the number of records to refresh. If nRecords is 1 or you omit nRecords, only the current record is refreshed. I f nRecords is 0, no records are refreshed.
nRecordOffset (Optional)
Type: Usual
Specifies the number of records before the current record where the refresh begins. For example, if the current record is record 10 and nRecordOffset is 4, record refresh begins with record 6. If nRecordOffset is 0 or you omit nRecordOffset, the refresh begins with the current record.
uArea (Optional)
Type: Usual
Specifies the alias of the cursor associated with a SQL remote or local view, or a CursorAdapter cursor where records are refreshed.
Or
Specifies the work area of cursor where records are refreshed. If you omit uArea, records are refreshed in the currently selected work area.

Return Value

Type: Long
Numeric. Refresh( ) returns the number of records refreshed.
Remarks
The records are refreshed with data from the tables that define the SQL view or CursorAdapter. Unless specified, records are refreshed in the SQL view or CursorAdapter cursor open in the currently selected work area.
Refresh( ) does not refresh content for buffered records; however, field values that are accessible for the record through the CurVal( ) function are refreshed. For more information, see CurVal( ) Function.
Records must have unique primary keys. If a key for a record cannot be located in the base table, the corresponding record in the SQL view or CursorAdapter is marked for deletion.
Calling the Refresh( ) function can result in a significant impact on performance because the function re-executes the query on which the view is based. Therefore, do not call this function more than necessary.
See Also