Compartir a través de


SqlCeCommand.CommandType Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets or sets a value indicating how the CommandText property is interpreted.

  [Visual Basic]
  Public Overridable Property CommandType As CommandType  Implements _
   IDbCommand.CommandType
[C#]
public virtual CommandType CommandType {get; set;}
[C++]
public: __property virtual CommandType get_CommandType();
public: __property virtual void set_CommandType(CommandType);
[JScript]
public function get CommandType() : CommandType;
public function set CommandType(CommandType);

Property Value

One of the CommandType values. The default is Text.

Implements

IDbCommand.CommandType

Exceptions

Exception Type Condition
ArgumentException The value was not a valid CommandType.

Remarks

SQL Server CE supports only the Text and TableDirect. TableDirect is the fastest way to retrieve data from SQL Server CE. An unsupported exception is thrown if StoredProcedure is specified.

The Connection, CommandType, and CommandText properties cannot be set if the current connection is performing an Execute or Fetch operation.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeCommand Class | SqlCeCommand Members | System.Data.SqlServerCe Namespace | CommandText | UpdatedRowSource

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.