ServerConnection.CommitTransaction Método
Commits the current transaction on the referenced connection.
Espacio de nombres: Microsoft.SqlServer.Management.Common
Ensamblado: Microsoft.SqlServer.ConnectionInfo (en Microsoft.SqlServer.ConnectionInfo.dll)
Sintaxis
'Declaración
Public Sub CommitTransaction
'Uso
Dim instance As ServerConnection
instance.CommitTransaction()
public void CommitTransaction()
public:
void CommitTransaction()
member CommitTransaction : unit -> unit
public function CommitTransaction()
Ejemplos
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()
Vea también
Referencia
Espacio de nombres Microsoft.SqlServer.Management.Common