Microsoft.Data.SqlClient.SqlParameter
Represents a parameter to a SqlCommand and optionally its mapping to DataSet columns. This class cannot be inherited. For more information on parameters, see Configuring parameters
Gets or sets the CompareInfo object that defines how string comparisons should be performed for this parameter.
Enforces encryption of a parameter when using Always Encrypted. If SQL Server informs the driver that the parameter does not need to be encrypted, the query using the parameter will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing incorrect encryption metadata to the client, which may lead to data disclosure.
Gets or sets the locale identifier that determines conventions and language for a particular region.
Gets or sets the offset to the Value property.
Gets or sets the maximum number of digits used to represent the Value property.
Gets or sets the number of decimal places to which Value is resolved.
Gets or sets the SqlDbType of the parameter.
Gets or sets the value of the parameter as an SQL type.
Gets or sets the type name for a table-valued parameter.
Gets or sets a String that represents a user-defined type as a parameter.
Gets the name of the database where the schema collection for this XML instance is located.
Gets the name of the schema collection for this XML instance.
The owning relational schema where the schema collection for this XML instance is located.
public SqlParameter()
Initializes a new instance of the SqlParameter class.
Initializes a new instance of the SqlParameter class that uses the parameter name and the data type.
Initializes a new instance of the SqlParameter class that uses the parameter name, the SqlDbType, and the size.
public SqlParameter(string parameterName, SqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value)
Initializes a new instance of the SqlParameter class that uses the parameter name, the type of the parameter, the size of the parameter, a ParameterDirection, the precision of the parameter, the scale of the parameter, the source column, a DataRowVersion to use, and the value of the parameter.
public SqlParameter(string parameterName, SqlDbType dbType, int size, ParameterDirection direction, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value, string xmlSchemaCollectionDatabase, string xmlSchemaCollectionOwningSchema, string xmlSchemaCollectionName)
Initializes a new instance of the SqlParameter class that uses the parameter name, the type of the parameter, the length of the parameter the direction, the precision, the scale, the name of the source column, one of the DataRowVersion values, a Boolean for source column mapping, the value of the SqlParameter, the name of the database where the schema collection for this XML instance is located, the owning relational schema where the schema collection for this XML instance is located, and the name of the schema collection for this parameter.
Initializes a new instance of the SqlParameter class that uses the parameter name, the SqlDbType, the size, and the source column name.
Initializes a new instance of the SqlParameter class that uses the parameter name and a value of the new SqlParameter.
Resets the type associated with this SqlParameter.