当前语句的参数集合。在 CommandText 中使用问号来表示参数。
Visual Basic Public Readonly Property Parameters As SAParameterCollection
C# public SAParameterCollection Parameters { get;}
SQL 语句或存储过程的参数。缺省值为空集合。
当 CommandType 设置为 Text 时,请使用问号占位符传递参数。例如:
SELECT * FROM Customers WHERE ID = ? |
将 SAParameter 对象添加到 SAParameterCollection 的顺序必须与命令文本中该参数问号占位符的位置直接对应。
当集合中的参数与要执行的查询的要求不匹配时,可能会导致错误或抛出异常。
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |