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 BeginTransCompleteCommitTransCompleteRollbackTransComplete 事件


❮ Complete Connection Object Reference

事件是在特定操作发生后可以自动调用的子例程。

  • BeginTransComplete 事件可以在 BeginTrans 调用完成后触发。
  • CommitTransComplete 事件可以在 CommitTrans 调用完成后触发。
  • RollbackTransComplete 事件可以在 RollbackTrans 调用完成后触发。

语法

BeginTransComplete translevel,objerror,status,objconn

CommitTransComplete objerror,status,objconn

RollbackTransComplete objerror,status,objconn

参数 描述
translevel 触发该事件的 BeginTrans 方法的事务级别
objerror 包含发生的错误的 Error 对象

注意: EventStatusEnum 值必须设置为 adStatusErrorsOccurred 才能创建 Error 对象

status 指定事件执行的状态。采用 EventStatusEnum
objconn 触发该事件的 Connection 对象

EventStatusEnum 值

常量 描述
adStatusOK 1 触发该事件的操作成功
adStatusErrorsOccurred 2 触发该事件的操作失败
adStatusCantDeny 3 无法取消挂起的操作
adStatusCancel 4 取消触发该事件的操作
adStatusUnwantedEvent 5 在事件方法执行完毕之前阻止后续通知

❮ Complete Connection Object Reference
×

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.