共用方式為


CDaoRecordset::m_nParams

Contains the number of parameter data members in the recordset class — the number of parameters passed with the recordset's query.

Remarks

If your recordset class has any parameter data members, the constructor for the class must initialize m_nParams with the correct number. The value of m_nParams defaults to 0. If you add parameter data members — which you must do manually — you must also manually add an initialization in the class constructor to reflect the number of parameters (which must be at least as large as the number of '?' placeholders in your m_strFilter or m_strSort string).

The framework uses this number when it parameterizes the recordset's query.

注意

This number must correspond to the number of "params" registered in DoFieldExchange after a call to SetFieldType with the parameter CFieldExchange::param.

For related information, see the topic "Parameter Object" in DAO Help.

Requirements

Header: afxdao.h

See Also

Reference

CDaoRecordset Class

Hierarchy Chart

Other Resources

CDaoRecordset Members