CDaoQueryDef::GetFieldInfo

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 desired field in the querydef’s Fields collection, for lookup by index.

fieldinfo

A reference to a CDaoFieldInfo object that returns the information requested.

dwInfoOptions

Options that specify which information about the field to retrieve. The available options are listed here along with what they cause the function to return:

lpszName

A string containing the name of the desired field, for lookup by name. You can use a CString.

Remarks

Call this member function to obtain various kinds of information about a field defined in the querydef. For a description of the information returned in fieldinfo, see the CDaoFieldInfo structure. This structure has members that correspond to the descriptive information under dwInfoOptions above. If you request one level of information, you get any prior levels of information as well.

For more information about obtaining field information, see the article DAO Collections: Obtaining Information About DAO Objects in Visual C++ Programmer's Guide.

CDaoQueryDef OverviewClass MembersHierarchy Chart

See Also   CDaoQueryDef::GetFieldCount