使用事务时,可以决定何时将对对象的更改保存到图形数据库。您可以使用该方法保存对事务中打开的对象所做的更改。如果您的程序遇到错误,您可以使用该方法回滚事务中所做的任何更改。CommitAbort 之前未调用的 ifis 被调用,事务中所做的所有更改都将回滚。无论调用了什么,都需要调用来表示交易结束。如果事务对象以语句启动,则不必调用。CommitDisposeCommitAbortDisposeUsingDispose VB.NET'' Commit the changes made within the transaction <transaction>.Commit() '' Abort the transaction and rollback to the previous state <transaction>.Abort() C#// Commit the changes made within the transaction <transaction>.Commit(); // Abort the transaction and rollback to the previous state <transaction>.Abort(); |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )
GMT+8, 2024-5-19 14:59
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.