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 删除 方法


❮ 记录集对象完整参考

Delete 方法用于删除当前记录或一组记录。删除记录后,已删除的记录保持为当前记录,直到您移动到其他记录。

注意:如果您处于批处理更新模式,则删除操作将在您调用 UpdateBatch 方法时发生。

注意:要使用此方法,请确保 Recordset 对象允许记录删除。

注意:如果此方法失败,提供程序将不会停止执行,但会向 Errors 集合发送警告。 

语法

objRecordset.Delete affectrecords

参数 描述
affectrecords 一个 AffectEnum 值,指定此方法将删除哪些记录。默认为 adAffectCurrent

AffectEnum 值

常量 描述
adAffectCurrent 1 仅删除当前记录
adAffectGroup 2 仅删除满足 Filter 设置的记录(Filter 必须设置为 FilterGroupEnum 值或书签数组)

❮ 记录集对象完整参考
×

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.