CDynamicParameterAccessor::GetParam

从参数缓冲区检索 nonstring 的数据指定的参数。

template < class ctype > bool GetParam( 
   DBORDINAL nParam, 
   ctype* pData  
) const throw( ); 
template < class ctype > bool GetParam( 
   TCHAR* pParamName, 
   ctype* pData  
) const throw( ); 
void* GetParam( 
   DBORDINAL nParam  
) const throw( ); 
void* GetParam( 
   TCHAR* pParamName  
) const throw( );

参数

  • ctype
    是数据类型的模板参数。

  • nParam
    [in] 参数数目 (偏离 1)。 为返回值保留参数 0 。 参数编号是基于其用 SQL 或存储过程调用的参数的索引。 有关示例,请参见SetParam

  • pParamName
    [in] 参数名。

  • pData
    [out] 对包含数据的内存的指针检索从缓冲区。

返回值

对于 nontemplated 版本,对包含数据内存的位置检索从缓冲区。 模板化版本在成功上返回 true 或在失败上返回 false

使用 GetParam 检索 nonstring 从缓冲区的参数数据。 使用 GetParamString 从缓冲区检索字符串参数数据。

要求

标头: atldbcli.h

请参见

参考

CDynamicParameterAccessor 类