다음을 통해 공유


CommitTransaction 메서드

Commits the current transaction on the referenced connection.

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)

구문

‘선언
Public Sub CommitTransaction
‘사용 방법
Dim instance As ServerConnection

instance.CommitTransaction()
public void CommitTransaction()
public:
void CommitTransaction()
member CommitTransaction : unit -> unit 
public function CommitTransaction()

C#

ServerConnection conn = new ServerConnection();
conn.DatabaseName = "AdventureWorks2008R2";
conn.BeginTransaction();
conn.ExecuteNonQuery("CREATE TABLE TABLE1(d int, name varchar(32));")
conn.CommitTransaction();

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
$conn.DatabaseName = "AdventureWorks2008R2"
$conn.BeginTransaction()
$conn.ExecuteNonQuery("CREATE TABLE TABLE1(d int,name varchar(32));")
$conn.CommitTransaction()