Partager via


CDaoFieldExchange::SetFieldType

void SetFieldType( UINTnFieldType );

Parameters

nFieldType

A value of the enumFieldType, declared in CDaoFieldExchange, which can be either of the following:

  • CDaoFieldExchange::outputColumn

  • CDaoFieldExchange::param

Remarks

Call SetFieldType in your CDaoRecordset class’s DoFieldExchange override. 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.

For more information about DFX, see the article in Visual C++ Programmer's Guide.

CDaoFieldExchange OverviewClass MembersHierarchy Chart

See Also   CDaoFieldExchange::IsValidOperation, CDaoRecordset::DoFieldExchange