Delen via


CDaoFieldExchange::SetFieldType

Call SetFieldType in your CDaoRecordset class's DoFieldExchange override.

void SetFieldType( 
   UINT nFieldType  
);

Parameters

  • nFieldType
    A value of the enum FieldType, declared in CDaoFieldExchange, which can be either of the following:

    • CDaoFieldExchange::outputColumn

    • CDaoFieldExchange::param

Remarks

Normally, ClassWizard writes this call for you. If you write your own function and are using the wizard to write your DoFieldExchange function, add calls to your own function outside the field map. If you do not use the wizard, there will not be a field map. The call precedes calls to DFX functions, one for each field data member of your class, and identifies the field type as CDaoFieldExchange::outputColumn.

If you parameterize your recordset class, you should add DFX calls for all parameter data members (outside the field map) and precede these calls with a call to SetFieldType. Pass the value CDaoFieldExchange::param. (You can, instead, use a CDaoQueryDef and set its parameter values.)

In general, each group of DFX function calls associated with field data members or parameter data members must be preceded by a call to SetFieldType. The nFieldType parameter of each SetFieldType call identifies the type of the data members represented by the DFX function calls that follow the SetFieldType call.

Requirements

Header: afxdao.h

See Also

Reference

CDaoFieldExchange Class

Hierarchy Chart

CDaoFieldExchange::IsValidOperation

CDaoRecordset::DoFieldExchange