UserOptions.AbortTransactionOnError UserOptions.AbortTransactionOnError UserOptions.AbortTransactionOnError Property

Definition

Gets or sets the Boolean property value that specifies whether transactions are automatically terminated or not.

public:
 property bool AbortTransactionOnError { bool get(); void set(bool value); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.SqlAzureDatabase | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Deploy, "false")]
public bool AbortTransactionOnError { get; set; }
Public Property AbortTransactionOnError As Boolean
Property Value

A Boolean value that specifies the whether a transaction is automatically terminated and rolled back when an error occurs.

If True, transactions are automatically terminated and rolled back when an error occurs.

If False (default), transactions are not terminated when an error occurs; instead, a warning message is displayed and the transaction continues.

Examples

Configuring SQL Server in SMO

Remarks

Use this option if you want to handle errors programmatically.

Applies to