commit Method (SQLServerConnection)
Makes all changes made since the previous commit or rollback permanent, and releases any database locks currently held by this SQLServerConnection object.
Syntax
public void commit()
Exceptions
Remarks
This commit method is specified by the commit method in the java.sql.Connection interface.
This method should be used only when auto-commit mode has been disabled.
Note that this method will fail and throw an exception if the client starts a manual transaction and then for some reason SQL Server rolls back the manual transaction. For example, an exception is thrown if the client calls a stored procedure that explicitly calls ROLLBACK TRANSACTION, and then the client calls the commit method. In addition, if SQL Server raises an error of sufficient severity (16 or higher) to roll back the client initiated manual transaction; a subsequent call to the commit method will throw an exception.
See Also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho