Méthode CommitTransaction
Commits the current transaction on the referenced connection.
Espace de noms : Microsoft.SqlServer.Management.Common
Assembly : Microsoft.SqlServer.ConnectionInfo (en Microsoft.SqlServer.ConnectionInfo.dll)
Syntaxe
'Déclaration
Public Sub CommitTransaction
'Utilisation
Dim instance As ServerConnection
instance.CommitTransaction()
public void CommitTransaction()
public:
void CommitTransaction()
member CommitTransaction : unit -> unit
public function CommitTransaction()
Exemples
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()
Voir aussi