REFRESH( ) Function
Refreshes data in an updatable SQL view.
REFRESH([nRecords [, nRecordOffset]] [, cTableAlias | nWorkArea])
Return Values
Numeric
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 remote SQL view in which records are refreshed. - nWorkArea
Specifies the work area of the table or cursor in which records are refreshed. If you omit nWorkArea and cTableAlias, records are refreshed in the remote SQL view in the currently selected work area.
Remarks
REFRESH( ) returns the number of records refreshed.
The records are refreshed with data from the tables from which the SQL view is created. Records are refreshed in the SQL view open in the currently selected work area.
REFRESH( ) cannot refresh locked or buffered records, and the records must have unique primary keys. If a record in a table does not have a primary key value, the corresponding record in the SQL view is marked for deletion.
Tip Calling the REFRESH( ) function can result in a significant impact on performance, because the function reexecutes the query on which the view is based. Therefore, do not call this function more than necessary.