MySQL Connector/Net |
MySqlParameter Constructor (String, MySqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object) |
MySqlParameter Class See Also Send Feedback |
Initializes a new instance of the MySqlParameter class with 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.
Namespace:
MySql.Data.MySqlClient
Assembly:
MySql.Data (in MySql.Data.dll) Version: 6.2.2.0
Syntax
C# |
---|
public MySqlParameter( string parameterName, MySqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, Object value ) |
Visual Basic (Declaration) |
---|
Public Sub New ( _ parameterName As String, _ dbType As MySqlDbType, _ size As Integer, _ direction As ParameterDirection, _ isNullable As Boolean, _ precision As Byte, _ scale As Byte, _ sourceColumn As String, _ sourceVersion As DataRowVersion, _ value As Object _ ) |
Visual C++ |
---|
public: MySqlParameter( String^ parameterName, MySqlDbType dbType, int size, ParameterDirection direction, bool isNullable, unsigned char precision, unsigned char scale, String^ sourceColumn, DataRowVersion sourceVersion, Object^ value ) |
Parameters
- parameterName
- Type: System..::.String
The name of the parameter to map.
- dbType
- Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
- size
- Type: System..::.Int32
The length of the parameter.
- direction
- Type: System.Data..::.ParameterDirection
One of the ParameterDirection values.
- isNullable
- Type: System..::.Boolean
true if the value of the field can be null, otherwise false.
- precision
- Type: System..::.Byte
The total number of digits to the left and right of the decimal point to which Value is resolved.
- scale
- Type: System..::.Byte
The total number of decimal places to which Value is resolved.
- sourceColumn
- Type: System..::.String
The name of the source column.
- sourceVersion
- Type: System.Data..::.DataRowVersion
One of the DataRowVersion values.
- value
- Type: System..::.Object
An Object that is the value of the MySqlParameter.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException |