CDynamicParameterAccessor::SetParamString
将缓冲区存储的指定参数的字符串数据。
bool SetParamString(
DBORDINAL nParam,
const CHAR* pString,
DBSTATUS status = DBSTATUS_S_OK
) throw( );
bool SetParamString(
DBORDINAL nParam,
const WCHAR* pString,
DBSTATUS status = DBSTATUS_S_OK
) throw( );
参数
nParam
[] 参数号 (从 1) 的偏移量。 参数 0 保留了对返回值。 参数编号是基于其在 SQL 的顺序的参数的索引或存储过程调用。 有关示例 SetParam 参见。pString
[out] 一个指向 ANSI (CHAR) 的指针或 Unicode (WCHAR) 指定参数的字符串数据。 在参见 oledb.h 的 DBSTATUS 。status
[in] 指定参数的 DBSTATUS 状态。 有关 DBSTATUS 值的信息,请参见 OLE DB 程序员参考状态或搜索在 oledb.h 的 DBSTATUS 。
备注
返回在成功在失败时进行 true 或 false 。
SetParamString 将失败,如果尝试将设置为大于 pString指定的最大大小的字符串。
使用 SetParamString 设置字符串缓冲区中的参数数据。 使用 SetParam 设置缓冲区中的非字符串的参数数据。
要求
Header: atldbcli.h