Call this member function to obtain information about the fields in a recordset.
void GetFieldInfo( int nIndex, CDaoFieldInfo& fieldinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO ); void GetFieldInfo( LPCTSTR lpszName, CDaoFieldInfo& fieldinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
One version of the function lets you look up a field by index. The other version lets you look up a field by name.
For a description of the information returned, see the CDaoFieldInfo structure. This structure has members that correspond to the items of information listed above in the description of dwInfoOptions. When you request information at one level, you get information for any prior levels as well.
For related information, see the topic "Attributes Property" in DAO Help.