void GetFieldInfo( int nIndex, CDaoFieldInfo& fieldinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
throw( CDaoException, CMemoryException );
void GetFieldInfo( LPCTSTR lpszName, CDaoFieldInfo& fieldinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
throw( CDaoException, CMemoryException );
Parameters
nIndex
The zero-based index of the predefined field in the recordset’s Fields collection, for lookup by index.
fieldinfo
A reference to a CDaoFieldInfo structure.
dwInfoOptions
Options that specify which information about the recordset to retrieve. The available options are listed here along with what they cause the function to return. For best performance, retrieve only the level of information you need:
lpszName The name of the field.
Remarks
Call this member function to obtain information about the fields in a recordset. 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 more information about creating recordsets, see the article DAO Recordset: Creating Recordsets in Visual C++ Programmer's Guide. For related information, see the topic "Attributes Property" in DAO Help.
CDaoRecordset Overview | Class Members | Hierarchy Chart
See Also CDaoRecordset::GetFieldCount, CDaoRecordset::GetFieldValue, CDaoRecordset::GetIndexCount, CDaoRecordset::GetIndexInfo