Compartir a través de


CDynamicStringAccessor::SetString

Sets the specified column data as a string.

HRESULT SetString(
   DBORDINAL nColumn,
   BaseType* data
) throw( );
HRESULT SetString(
   const CHAR* pColumnName,
   BaseType* data
) throw( );
HRESULT SetString(
   const WCHAR* pColumnName,
   BaseType* data
) throw( );

Parameters

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

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

  • data
    [in] A pointer to the string data to be written to the specified column.

Return Value

A pointer to the string value to which to set the specified column. The value is of type BaseType, which will be CHAR or WCHAR depending on whether _UNICODE is defined or not.

Remarks

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

If _SECURE_ATL is defined to have a nonzero value, a runtime assertion failure will be generated if the input data string is longer than the maximum allowable length of the referenced data column. Otherwise, the input string will be truncated if it is longer than the maximum allowable length.

Requirements

Header: atldbcli.h

See Also

Reference

CDynamicStringAccessor Class