Partager via


CDynamicStringAccessor::GetString

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CDynamicStringAccessor::GetString.

Retrieves the specified column data as a string.

Syntax

  
      BaseType* GetString(  
   DBORDINAL nColumn  
) const throw( );  
BaseType* GetString(  
   const CHAR* pColumnName  
) const throw( );  
BaseType* GetString(  
   const WCHAR* pColumnName  
) const throw( );  

Parameters

nColumn
[in] The column number. Column numbers start with 1. A value of 0 refers to the bookmark column, if any.

pColumnName
[in] A pointer to a character string that contains the column name.

Return Value

A pointer to the string value retrieved from the specified column. The value is of type BaseType, which will be CHAR or WCHAR depending on whether _UNICODE is defined or not. Returns NULL if the specified column is not found.

Remarks

The second override form takes the column name as an ANSI string. The third override form takes the column name as a Unicode string.

Requirements

Header: atldbcli.h

See Also

CDynamicStringAccessor Class