Mono Class Library: System.Data.SqlClient.SqlConnection Overview | Members

System.Data.SqlClient.SqlConnection.CreateCommand Method

Creates a new instance of the System.Data.SqlClient.SqlCommand class with the connection referencing the current System.Data.SqlClient.SqlCommand instance.

public SqlCommand CreateCommand ()

Returns

A new instance of the System.Data.SqlClient.SqlCommand class.

Remarks

Creates a new instance of the System.Data.SqlClient.SqlCommand class with the connection referencing the current System.Data.SqlClient.SqlCommand instance.

The returned System.Data.SqlClient.SqlCommand instance can be used to execute T-SQL statements or stored procedures against the current database connection.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0