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 查找 方法


❮ 记录集对象完整参考

Find 方法在记录集中搜索满足指定条件的记录。如果搜索成功,记录指针将指向第一个找到的记录。

注意:在调用此方法之前必须设置当前行位置(如 MoveFirst),否则会发生错误。

语法

objRecordset.Find(criteria,skiprows,direction,start)

参数 描述
criteria 必需。用于搜索的列名、比较运算符和值。

示例

"Country='Norway'"
"Date>#7/22/97#"
"Country LIKE N*"

注意:此方法不支持多列搜索(AND 或 OR)

skiprows 可选。指定在开始搜索之前要跳过的当前记录以外的记录数。默认值为 0 
direction 可选。一个 SearchDirectionEnum 值,指定搜索方向
start 可选。搜索的起始位置

SearchDirectionEnum 值

常量 描述
adSearchBackward -1 从起始位置向后搜索。在记录集的开头停止。如果未找到匹配项,则记录指针将放置在记录集的开头
adSearchForward 1 从起始位置向前搜索。在记录集的结尾停止。如果未找到匹配项,则记录指针将放置在记录集的结尾

❮ 记录集对象完整参考
×

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.