ServerConnection.RollBackTransaction 메서드
Rolls back the current transaction.
네임스페이스: Microsoft.SqlServer.Management.Common
어셈블리: Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)
구문
‘선언
Public Sub RollBackTransaction
‘사용 방법
Dim instance As ServerConnection
instance.RollBackTransaction()
public void RollBackTransaction()
public:
void RollBackTransaction()
member RollBackTransaction : unit -> unit
public function RollBackTransaction()
예
C#
ServerConnection conn = new ServerConnection();
conn.DatabaseName = "AdventureWorks2012";
conn.BeginTransaction();
conn.ExecuteNonQuery("CREATE TABLE TABLE1(d int, name varchar(32));")
conn.RollBackTransaction();
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.RollBackTransaction()
See Also