CDynamicParameterAccessor::SetParamString
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 CDynamicParameterAccessor::SetParamString.
Sets the string data of the specified parameter stored in the buffer.
Syntax
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( );
Parameters
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.
pString
[in] A pointer to the ANSI (CHAR) or Unicode (WCHAR) string data of the specified parameter. See DBSTATUS
in oledb.h.
status
[in] The DBSTATUS
status of the specified parameter. For information on DBSTATUS
values, see Status in the OLE DB Programmer's Reference, or search for DBSTATUS
in oledb.h.
Remarks
Returns true on success or false on failure.
SetParamString
will fail if you try to set a string that is larger than the maximum size specified for pString
.
Use SetParamString
to set string parameter data in the buffer. Use SetParam to set nonstring parameter data in the buffer.
Requirements
Header: atldbcli.h