MySqlCommand Constructor

MySQL Connector/Net

MySqlCommand Constructor
Initializes a new instance of the MySqlCommand class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.9.9
Syntax
public MySqlCommand()
Public Sub New
public:
MySqlCommand()
new : unit -> MySqlCommand
Remarks
The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of MySqlCommand.
PropertiesInitial Value
CommandTextempty string ("")
CommandTimeout0
CommandTypeCommandType.Text
ConnectionNull

You can change the value for any of these properties through a separate call to the property.

Examples
The following example creates a MySqlCommand and sets some of its properties.
public void CreateMySqlCommand()
{
MySqlCommand myCommand = new MySqlCommand();
myCommand.CommandType = CommandType.Text;
}
Public Sub CreateMySqlCommand()
Dim myCommand As New MySqlCommand()
myCommand.CommandType = CommandType.Text
End Sub

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also