SqlTransaction.Save(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a savepoint in the transaction that can be used to roll back a part of the transaction, and specifies the savepoint name.
public:
void Save(System::String ^ savePointName);
public void Save (string savePointName);
override this.Save : string -> unit
member this.Save : string -> unit
Public Sub Save (savePointName As String)
- savePointName
- String
The name of the savepoint.
An error occurred while trying to commit the transaction.
The transaction has already been committed or rolled back.
-or-
The connection is broken.
Save method is equivalent to the Transact-SQL SAVE TRANSACTION statement.
The value used in the savePoint
parameter can be the same value used in the transactionName
parameter of some implementations of the BeginTransaction method.
Savepoints offer a mechanism to roll back parts of transactions. You create a savepoint using the Save method, and then later call the Rollback method to roll back to the savepoint instead of rolling back to the start of the transaction.
מוצר | גירסאות |
---|---|
.NET | Core 1.0, Core 1.1, 6 (package-provided), 8 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
משוב של .NET
.NET הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב: