Export (0) Print
Expand All
Expand Minimize

CommandType Enumeration

Specifies how a command string is interpreted.

Namespace: System.Data
Assembly: System.Data (in system.data.dll)

'Declaration
Public Enumeration CommandType
'Usage
Dim instance As CommandType

public enum CommandType
public enum CommandType

 Member nameDescription
Supported by the .NET Compact FrameworkStoredProcedureThe name of a stored procedure. 
Supported by the .NET Compact FrameworkTableDirectThe name of a table. 
Supported by the .NET Compact FrameworkTextAn SQL text command. (Default.)  

When the CommandType property is set to StoredProcedure, the CommandText property should be set to the name of the stored procedure to be accessed. The user may be required to use escape character syntax or include qualifying characters if any of the specified tables named contain any special characters. All rows and columns of the named table or tables will be returned when you call one of the Execute methods of a Command object.

When the CommandType property is set to TableDirect, the CommandText property should be set to the name of the table to be accessed. The user may be required to use escape character syntax or include qualifying characters if any of the tables named contain any special characters. All rows and columns of the named table will be returned when you call one of the Execute methods.

In order to access multiple tables, use a comma delimited list, without spaces or padding, containing the names of the tables to access. When the CommandText property names multiple tables, a join of the specified tables is returned.

NoteNote:

TableDirect is only supported by the .NET Framework Data Provider for OLE DB. Multiple table access is not supported when CommandType is set to TableDirect.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2014 Microsoft