Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

ADO 筛选器 属性


❮ 记录集对象完整参考

Filter 属性设置或返回一个包含记录集对象中数据筛选器的变体。筛选器允许您选择符合特定条件的记录。

Filter 属性可以包含以下内容之一:

条件字符串示例

  • rs.Filter="Lastname='Smith'"
  • rs.Filter="Lastname='Smith' AND Birthdate >= #4/10/70#"
  • rs.Filter="Lastname='Jonson' OR Lastname='Johnson'"
  • rs.Filter= "Lastname LIKE 'Jon*'"
  • rs.Filter="[Company Name]='Alfred Futterkiste' OR Orders>$300.00"

书签数组示例

dim fname(10)
fname(2)=rs.Bookmark
rs.Filter=fname(2)

当设置 Filter 属性时,光标将移动到筛选后的记录集中第一条记录。并且,当清除 Filter 属性时,光标将移动到未筛选的记录集中第一条记录。


语法

objRecordset.Filter

FilterGroupEnum 值

常量 描述
adFilterNone 0 移除当前筛选器
adFilterPendingRecords 1 筛选器,仅显示尚未发送到服务器的已编辑记录
adFilterAffectedRecords 2 筛选器,仅显示受上次 Delete、Resync、UpdateBatch 或 CancelBatch 调用影响的记录
adFilterFetchedRecords 3 筛选器,显示当前缓存中的记录
adFilterConflictingRecords 5 筛选器,显示上次批处理更新失败的记录

❮ 记录集对象完整参考
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.