Partager via


CDynamicParameterAccessor::GetParam

Retrieves the nonstring data for a specified parameter from the parameter buffer.

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( );

Parameters

  • ctype
    A templated parameter that is the data type.

  • nParam
    [in] The parameter number (offset from 1). Parameter 0 is reserved for return values. The parameter number is the index of the parameter based on its order in the SQL or stored procedure call. See SetParam for an example.

  • pParamName
    [in] The parameter name.

  • pData
    [out] The pointer to the memory containing the data retrieved from the buffer.

Return Value

For nontemplated versions, points to the memory containing the data retrieved from the buffer. For templated versions, returns true on success or false on failure.

Use GetParam to retrieve nonstring parameter data from the buffer. Use GetParamString to retrieve string parameter data from the buffer.

Requirements

Header: atldbcli.h

See Also

Reference

CDynamicParameterAccessor Class

Other Resources

CDynamicParameterAccessor Members