|
Structure CPInfo Structure CPInfo indicates a parameter information, and is defined here. CPInfo is used with CBatchParam<T>::Open for opening a CBatchParam<T> object and sending multiple sets of parameter data into a data source. For how to use it, see examples MultiProcs and BLOBs. m_nDBType can't be DBTYPE_X|DBTYPE_BYREF, DBTYPE_X|DBTYPE_ARRAY or DBTYPE_DBTYPE_VECTOR. If setting to one of them, you will get an assert message. When m_nDBType is one of variable-length types and data length in chars (DBTYPE_BYTES in bytes) is over 255 too, you are required to set m_nLen in bytes. Additionally, if a parameter is involved with a BLOB, you may need to set m_nLen to OLEDB_PARAM_BLOB for safety. For all the other cases, m_nLen is ignored. If a parameter data type is one of DBTYPE_VARIANT, DBTYPE_BSTR and DBTYPE_PROPVARIANT, its parameter type is either DBPARAMIO_OUTPUT or DBPARAMIO_OUTPUT|DBPARAMIO_INPUT, you must free the provider-allocated memory as indicated in MSDN/Platform SDK/Data Access. For most of providers, m_strPName, which indicates the name of a parameter, can be ignored. If a parameter data is a BLOB, it is safer to set m_nLen to OLEDB_PARAM_BLOB. |