ServerConnection.CommitTransaction 메서드
참조된 연결에서 현재 트랜잭션을 커밋합니다.
네임스페이스: 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 = "AdventureWorks2012";
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 = "AdventureWorks2012"
$conn.BeginTransaction()
$conn.ExecuteNonQuery("CREATE TABLE TABLE1(d int,name varchar(32));")
$conn.CommitTransaction()
참고 항목
참조
Microsoft.SqlServer.Management.Common 네임스페이스