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


Parameters property

A collection of parameters for the current statement. Use question marks in the CommandText to indicate parameters.

Visual Basic

Public Readonly Property Parameters As SAParameterCollection

public SAParameterCollection Parameters { get;}
Property value

The parameters of the SQL statement or stored procedure. The default value is an empty collection.


When CommandType is set to Text, pass parameters using the question mark placeholder. 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 in the command text.

When the parameters in the collection do not match the requirements of the query to be executed, an error may result or an exception may be thrown.

See also