This documentation is archived and is not being maintained.

IDbCommand.CommandType Property

Indicates or specifies how the CommandText property is interpreted.

[Visual Basic]
Property CommandType As CommandType
CommandType CommandType {get; set;}
__property CommandType get_CommandType();
__property void set_CommandType(CommandType);
function get CommandType() : CommandType;function set CommandType(CommandType);

Property Value

One of the CommandType values. The default is Text.


When you set the CommandType property to StoredProcedure, you should set the CommandText property to the name of the stored procedure. The command executes this stored procedure when you call one of the Execute methods.


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

IDbCommand Interface | IDbCommand Members | System.Data Namespace