adoRSetResync
Previous Topic  Next Topic 

Synopsis:

       adoRSetResync(handle[,AffectRecord[,ResyncValues]])

Arguments:

       handle                - The recordset handle.

       AffectRecord        - Optional flag to specify which records are effected

       ResyncValues        - Option specifying if underlying values are updated


Description: This function refreshes the data in the recordset specified by handle.    It does not re-execute the query on the recordset therefore new records in the underlying database will not be visible.     If the attempt to resynchronize fails because of a conflict with the underlying data (for example, a record has been deleted by another user), the provider returns warnings to the Errors collection and a run-time error occurs.

The optional AffectRecord argument defined which records are affected by the resynchronization (default adAffectAll) and can be set to one of the following values as defined in the ado.inc:


const adAffectCurrent        = 1;     # just current record

const adAffectGroup                = 2;     # those made visible by filter

const adAffectAll                = 3;     # all records

const adAffectAllChapters        = 4;


The optional RsyncValues argument defines whether underlying values are overwritten.   It can be set to one of the following values as specified in ado.inc:

const adResyncUnderlyingValues        =1;                # Does not overwrite data, and pending updates are not canceled

const adResyncAllValues                =2;                # Default. Overwrites data, and pending updates are canceled


Returns:   Returns 0 upon success or a negative error code.   If ADOERR_COMERR is returned, then the underlying ADO error can be obtained by calling adoLastError()