Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SACommand class


CommandType property

Gets or sets the type of command represented by an SACommand.

Visual Basic

Public Overrides Property CommandType As CommandType

public override CommandType CommandType { get; set; }
Property value

One of the [external link] CommandType values. The default is [external link] CommandType.Text.


Supported command types are as follows:

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

Use a question mark (?) placeholder to pass parameters. For example:

SELECT * FROM Customers WHERE ID = ?

The order in which SAParameter objects are added to the SAParameterCollection must directly correspond to the position of the question mark placeholder for the parameter.

See also