ADO 필터 속성


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

Filter 속성은 Recordset 개체의 데이터에 대한 필터가 포함된 변형을 설정하거나 반환합니다. 필터를 사용하면 특정 기준에 맞는 레코드를 선택할 수 있습니다.

Filter 속성은 다음 중 하나를 포함할 수 있습니다.

기준 문자열의 예:

  • rs.Filter="성='스미스'"
  • rs.Filter="성='Smith' AND 생년월일 >= #4/10/70#"
  • rs.Filter="성='Jonson' OR 성='Johnson'"
  • rs.Filter= "성 LIKE 'Jon*'"
  • rs.Filter="[회사 이름]='Alfred Futterkiste' OR 주문>$300.00"

책갈피 배열의 예:

희미한 fname(10)
fname(2)=rs.Bookmark
rs.Filter=fname(2)

Filter 속성이 설정되면 커서가 필터링된 Recordset의 첫 번째 레코드로 이동합니다. 그리고 Filter 속성을 지우면 커서가 필터링되지 않은 Recordset의 첫 번째 레코드로 이동합니다.


통사론

objRecordset.Filter

FilterGroupEnum 값

Constant Value Description
adFilterNone 0 Removes the current filter
adFilterPendingRecords 1 Filter that displays only edited records that have not yet been sent to the server
adFilterAffectedRecords 2 Filter that displays only records affected by the last Delete, Resync, UpdateBatch, or CancelBatch call
adFilterFetchedRecords 3 Filter that displays the records in the current cache
adFilterConflictingRecords 5 Filter that displays those records that failed the last batch update

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