SqlExecutionException Constructors

Definition

Initializes a new instance of the SqlExecutionException class.

Overloads

SqlExecutionException()

Initializes a new instance of the SqlExecutionException class using default values.

SqlExecutionException(String)

Initializes a new instance of the SqlExecutionException class using the passed message.

SqlExecutionException(String, Exception)

Initializes a new instance of the SqlExecutionException class using the passed message and exception.

SqlExecutionException(String, String, String, String, String, SqlException)

Initializes a new instance of the SqlExecutionException class.

SqlExecutionException()

Initializes a new instance of the SqlExecutionException class using default values.

C#
public SqlExecutionException();

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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, 4.7.1, 4.7.2, 4.8, 4.8.1

SqlExecutionException(String)

Initializes a new instance of the SqlExecutionException class using the passed message.

C#
public SqlExecutionException(string message);

Parameters

message
String

The error message that explains the reason for the exception.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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, 4.7.1, 4.7.2, 4.8, 4.8.1

SqlExecutionException(String, Exception)

Initializes a new instance of the SqlExecutionException class using the passed message and exception.

C#
public SqlExecutionException(string message, Exception innerException);

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The Exception encountered.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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, 4.7.1, 4.7.2, 4.8, 4.8.1

SqlExecutionException(String, String, String, String, String, SqlException)

Initializes a new instance of the SqlExecutionException class.

C#
public SqlExecutionException(string message, string server, string database, string sqlFile, string commands, System.Data.SqlClient.SqlException sqlException);

Parameters

message
String

The error message that explains the reason for the exception.

server
String

The SQL Server instance against which the SQL commands are run.

database
String

The database against which the SQL commands are run.

sqlFile
String

The name of the installation file containing the SQL commands being run.

commands
String

The SQL commands being run when the exception occurred.

sqlException
SqlException

The SqlException encountered when processing the SQL commands.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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, 4.7.1, 4.7.2, 4.8, 4.8.1