JavaScript Editor js editor     Web development 



Main Page

Refreshes data in an updatable SQL remote or local view, or CursorAdapter cursor.

REFRESH([nRecords [, nRecordOffset]] [, cTableAlias | nWorkArea])

Parameters

nRecords


Specifies the number of records to refresh. If nRecords is 1 or you omit nRecords, only the current record is refreshed. If nRecords is 0, no records are refreshed.
nRecordOffset


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.
cTableAlias


Specifies the alias of the cursor associated with a SQL remote or local view, or a CursorAdapter cursor where records are refreshed.
nWorkArea


Specifies the work area of cursor where records are refreshed. If you omit nWorkArea and cTableAlias, records are refreshed in the currently selected work area.

Return Value

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.

Note:
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.

Caution:
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.

Tip:
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



JavaScript Editor js editor     Web development