DFX_Text
Visual Studio 2010
Transfers CString data between the field data members of a CDaoRecordset object and columns of a record on the data source.
void AFXAPI DFX_Text( CDaoFieldExchange* pFX, LPCTSTR szName, CString& value, int nPreAllocSize = AFX_DAO_TEXT_DEFAULT_SIZE, DWORD dwBindOptions = AFX_DAO_ENABLE_FIELD_CACHE );
Data is mapped between type DAO_CHAR in DAO (or, if the symbol _UNICODE is defined, DAO_WCHAR) and type CString in the recordset.
This example shows several calls to DFX_Text. Notice also the two calls to CDaoFieldExchange::SetFieldType. You must write the first call to SetFieldType and its DFX call. The second call and its associated DFX calls are normally written by the code wizard that generated the class.
void CCustSet::DoFieldExchange(CDaoFieldExchange* pFX) { pFX->SetFieldType(CDaoFieldExchange::param); DFX_Text(pFX, _T("Param"), m_strParam); pFX->SetFieldType(CDaoFieldExchange::outputColumn); DFX_Short(pFX, _T("EmployeeID"), m_EmployeeID); DFX_Text(pFX, _T("LastName"), m_LastName); DFX_Short(pFX, _T("Age"), m_Age); DFX_DateTime(pFX, _T("hire_date"), m_hire_date); DFX_DateTime(pFX, _T("termination_date"), m_termination_date); CDaoRecordset::DoFieldExchange(pFX); }
Note