MySqlSharp.Provider
Class MySqlParameter

Represents a parameter to a MySqlSharp.Provider.MySqlCommand, and optionally, its mapping to System.Data.DataSet columns.

Constructor Summary
MySqlParameter()
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class.
MySqlParameter(string parameterName, object value)
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name and a value of the new MySqlSharp.Provider.MySqlParameter.
MySqlParameter(string parameterName, MySqlSharp.Provider.MySqlDbType dbType)
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name and the data type.
MySqlParameter(string parameterName, MySqlSharp.Provider.MySqlDbType dbType, int size)
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the data type and the size.
MySqlParameter(string parameterName, MySqlSharp.Provider.MySqlDbType dbType, int size, string sourceColumn)
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the data type, the size and the source column name.
MySqlParameter(string parameterName, MySqlSharp.Provider.MySqlDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, object value)
         Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the type of the parameter, the size of the parameter, a System.Data.ParameterDirection, the precision of the parameter, the scale of the parameter, the source column, a System.Data.DataRowVersion to use, and the value of the parameter.

Property Summary
System.Data.DbType DbType
         Gets or sets the System.Data.DbType of the parameter.
System.Data.ParameterDirection Direction
         This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
bool IsNullable
         Gets or sets a value indicating whether the parameter accepts null values.
MySqlSharp.Provider.MySqlDbType MySqlDbType
         Gets or sets the MySqlSharp.Provider.MySqlParameter.MySqlDbType of the parameter.
int Offset
         Gets or sets the offset to the Value property.
string ParameterName
         Gets or sets the name of the MySqlSharp.Provider.MySqlParameter.
byte Precision
         Gets or sets the maximum number of digits used to represent the MySqlSharp.Provider.MySqlParameter.Value property.
byte Scale
         Gets or sets the number of decimal places to which MySqlSharp.Provider.MySqlParameter.Value is resolved.
int Size
         Gets or sets the maximum size, in bytes, of the data within the column.
string SourceColumn
         Gets or sets the name of the source column that is mapped to the System.Data.DataSet and used for loading or returning the MySqlSharp.Provider.MySqlParameter.Value.
System.Data.DataRowVersion SourceVersion
         Gets or sets the System.Data.DataRowVersion to use when loading MySqlSharp.Provider.MySqlParameter.Value.
object Value
         Gets or sets the value of the parameter.

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Constructor Detail

MySqlParameter

public MySqlParameter()

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class.


MySqlParameter

public MySqlParameter(string parameterName,
                      object value)

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name and a value of the new MySqlSharp.Provider.MySqlParameter.

When you specify an System.Object in the value parameter, the MySqlSharp.Provider.MySqlParameter.MySqlDbType is inferred from the .NET Framework type of the System.Object.

Parameters:
parameterName - The name of the parameter to map.
value - An System.Object that is the value of the MySqlSharp.Provider.MySqlParameter.

MySqlParameter

public MySqlParameter(string parameterName,
                      MySqlSharp.Provider.MySqlDbType dbType)

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name and the data type.

The data type, and if appropriate, MySqlSharp.Provider.MySqlParameter.Size and MySqlSharp.Provider.MySqlParameter.Precision are inferred from the value of the dbType parameter.

Parameters:
parameterName - The name of the parameter to map.
dbType - One of the MySqlSharp.Provider.MySqlParameter.MySqlDbType values.

MySqlParameter

public MySqlParameter(string parameterName,
                      MySqlSharp.Provider.MySqlDbType dbType,
                      int size)

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the data type and the size.

Parameters:
parameterName - The name of the parameter to map.
dbType - One of the MySqlSharp.Provider.MySqlParameter.MySqlDbType values.
size - The width of the parameter.

MySqlParameter

public MySqlParameter(string parameterName,
                      MySqlSharp.Provider.MySqlDbType dbType,
                      int size,
                      string sourceColumn)

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the data type, the size and the source column name.

Parameters:
parameterName - The name of the parameter to map.
dbType - One of the MySqlSharp.Provider.MySqlParameter.MySqlDbType values.
size - The width of the parameter.
sourceColumn - The name of the source column.

MySqlParameter

public MySqlParameter(string parameterName,
                      MySqlSharp.Provider.MySqlDbType dbType,
                      int size,
                      System.Data.ParameterDirection direction,
                      bool isNullable,
                      byte precision,
                      byte scale,
                      string sourceColumn,
                      System.Data.DataRowVersion sourceVersion,
                      object value)

Initializes a new instance of the MySqlSharp.Provider.MySqlParameter class with the parameter name, the type of the parameter, the size of the parameter, a System.Data.ParameterDirection, the precision of the parameter, the scale of the parameter, the source column, a System.Data.DataRowVersion to use, and the value of the parameter.

Parameters:
parameterName - The name of the parameter to map.
dbType - One of the MySqlSharp.Provider.MySqlParameter.MySqlDbType values.
size - The width of the parameter.
direction -
isNullable -
precision -
scale -
sourceColumn - The name of the source column.
sourceVersion -
value -
Property Detail

DbType

public System.Data.DbType DbType

Gets or sets the System.Data.DbType of the parameter.

Value:
One of the System.Data.DbType values. The default is System.String.
Throws:
System.ArgumentOutOfRangeException - The property was not set to a valid System.Data.DbType.

Direction

public System.Data.ParameterDirection Direction

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.


IsNullable

public bool IsNullable

Gets or sets a value indicating whether the parameter accepts null values.

Null values are handled using the System.DBNull class.

Value:
true if null values are accepted; otherwise, false. The default is false.

MySqlDbType

public MySqlSharp.Provider.MySqlDbType MySqlDbType

Gets or sets the MySqlSharp.Provider.MySqlParameter.MySqlDbType of the parameter.

Value:
One of the MySqlSharp.Provider.MySqlParameter.MySqlDbType values. The default is VarChar.

Offset

public int Offset

Gets or sets the offset to the Value property.

This property is used for binary and string types. It returns the number of bytes for binary types, and the number of characters for strings.

Value:
The offset to the Value. The default is 0.

ParameterName

public string ParameterName

Gets or sets the name of the MySqlSharp.Provider.MySqlParameter.

Value:
The name of the MySqlSharp.Provider.MySqlParameter. The default is an empty string.

Precision

public byte Precision

Gets or sets the maximum number of digits used to represent the MySqlSharp.Provider.MySqlParameter.Value property.

The MySqlSharp.Provider.MySqlParameter.Precision property is used by parameters which have a MySqlSharp.Provider.MySqlParameter.MySqlDbType of MySqlSharp.Provider.MySqlParameter.MySqlDbType.

Value:
The maximum number of digits used to represent the MySqlSharp.Provider.MySqlParameter.Value property. The default value is 0.

Scale

public byte Scale

Gets or sets the number of decimal places to which MySqlSharp.Provider.MySqlParameter.Value is resolved.

The MySqlSharp.Provider.MySqlParameter.Scale property is used by parameters which have a MySqlSharp.Provider.MySqlParameter.MySqlDbType of MySqlSharp.Provider.MySqlParameter.MySqlDbType.

Value:
The number of decimal places to which MySqlSharp.Provider.MySqlParameter.Value is resolved. The default is 0.

Size

public int Size

Gets or sets the maximum size, in bytes, of the data within the column.

Value:
The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.

SourceColumn

public string SourceColumn

Gets or sets the name of the source column that is mapped to the System.Data.DataSet and used for loading or returning the MySqlSharp.Provider.MySqlParameter.Value.

Value:
The name of the source column that is mapped to the System.Data.DataSet. The default is an empty string.

SourceVersion

public System.Data.DataRowVersion SourceVersion

Gets or sets the System.Data.DataRowVersion to use when loading MySqlSharp.Provider.MySqlParameter.Value.

Value:
One of the System.Data.DataRowVersion values. The default is System.Data.DataRowVersion.Current.

Value

public object Value

Gets or sets the value of the parameter.

Value:
An System.Object that is the value of the parameter. The default value is null.