This documentation is archived and is not being maintained.

SqlConnection.CreateCommand Method

Creates and returns a SqlCommand object associated with the SqlConnection.

[Visual Basic]
Public Function CreateCommand() As SqlCommand
public SqlCommand CreateCommand();
public: SqlCommand* CreateCommand();
public function CreateCommand() : SqlCommand;

Return Value

A SqlCommand object.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

SqlConnection Class | SqlConnection Members | System.Data.SqlClient Namespace