ADO 재동기화 방법


❮ 완전한 레코드세트 개체 참조

Resync 메서드는 Recordset의 데이터를 새로 고칩니다.

팁: 이 방법을 사용하여 레코드세트를 데이터베이스와 다시 동기화하십시오. 데이터베이스의 변경 사항을 확인하고 정적 또는 정방향 전용 레코드 집합을 사용하는 경우 이 방법이 유용합니다.

참고: 이 방법은 Recordset을 다시 실행하지 않으므로 데이터베이스의 새 레코드가 표시되지 않습니다.

통사론

objRecordset.Resync affectrecords,resyncvalues

Parameter Description
affectrecords Optional. An AffectEnum value that specifies which records this method will affect. Default is adAffectAll
resyncvalues Optional. A ResyncEnum value that specifies if underlying values are overwritten. Default is adResyncAllValues

영향 열거형 값

Constant Value Description
adAffectCurrent 1 Affects only the current record
adAffectGroup 2 Affects only records that satisfy the Filter setting (Filter must be set to a FilterGroupEnum value or an array of Bookmarks)
adAffectAll 3 Affects all records if there is no Filter. Affects only visible records in the current chapter if Filter is set to a string criteria. Affect all rows of the Recordset if Filter is set to a FilterGroupEnum value or an array of Bookmarks
adAffectAllChapters 4 Affects all records in all child Recordset, including those hidden by a currently applied filter

ResyncEnum 값

Constant Value Description
adResyncAllValues 2 Default. Overwrites data, and pending updates are canceled
adResyncUnderlyingValues 1 Does not overwrite data, and pending updates are not canceled

❮ 완전한 레코드세트 개체 참조