| title | SET_PARAM_TYPE | Microsoft Docs | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||
| ms.date | 11/04/2016 | |||||||||
| ms.reviewer | ||||||||||
| ms.suite | ||||||||||
| ms.technology |
|
|||||||||
| ms.tgt_pltfrm | ||||||||||
| ms.topic | article | |||||||||
| f1_keywords |
|
|||||||||
| dev_langs |
|
|||||||||
| helpviewer_keywords |
|
|||||||||
| ms.assetid | 85979070-2d55-4c67-94b1-9b9058babc59 | |||||||||
| caps.latest.revision | 9 | |||||||||
| author | mikeblome | |||||||||
| ms.author | mblome | |||||||||
| manager | ghogen | |||||||||
| translation.priority.ht |
|
|||||||||
| translation.priority.mt |
|
Specifies COLUMN_ENTRY macros that follow the SET_PARAM_TYPE macro input, output, or input/output.
SET_PARAM_TYPE(
type
)
type
[in] The type to set for the parameter.
Providers support only parameter input/output types that are supported by the underlying data source. The type is a combination of one or more DBPARAMIO values (see DBBINDING Structures in the OLE DB Programmer's Reference):
-
DBPARAMIO_NOTPARAM The accessor has no parameters. Typically, you set eParamIO to this value in row accessors to remind the user that parameters are ignored.
-
DBPARAMIO_INPUT An input parameter.
-
DBPARAMIO_OUTPUT An output parameter.
-
DBPARAMIO_INPUT | DBPARAMIO_OUTPUT The parameter is both an input and an output parameter.
class CArtistsProperty
{
public:
short m_nReturn;
short m_nAge;
TCHAR m_szFirstName[21];
TCHAR m_szLastName[31];
BEGIN_PARAM_MAP(CArtistsProperty)
SET_PARAM_TYPE(DBPARAMIO_OUTPUT)
COLUMN_ENTRY(1, m_nReturn)
SET_PARAM_TYPE(DBPARAMIO_INPUT)
COLUMN_ENTRY(2, m_nAge)
END_PARAM_MAP()
BEGIN_COLUMN_MAP(CArtistsProperty)
COLUMN_ENTRY(1, m_szFirstName)
COLUMN_ENTRY(2, m_szLastName)
END_COLUMN_MAP()
HRESULT OpenDataSource()
{
CDataSource _db;
_db.Open();
return m_session.Open(_db);
}
void CloseDataSource()
{
m_session.Close();
}
CSession m_session;
DEFINE_COMMAND_EX(CArtistsProperty, L" \
{ ? = SELECT Age FROM Artists WHERE Age < ? }")
};Header: atldbcli.h