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
[C#]
public SqlCommand CreateCommand();
[C++]
public: SqlCommand* CreateCommand();
[JScript]
public function CreateCommand() : SqlCommand;

Return Value

A SqlCommand object.

Requirements

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

Show: