CDaoTableDef::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 index of the field object in the table’s zero-based Fields collection, for lookup by index.

fieldinfo

A reference to a CDaoFieldInfo structure.

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 pointer to the name of the field object, for lookup by name. The name is a string with up to 64 characters that uniquely names the field.

Remarks

Call this member function to obtain various kinds of information about a field defined in the tabledef. 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 on tabledefs, see the articles DAO Tabledef and DAO Tabledef: Using Tabledefs in Visual C++ Programmer's Guide. For related information, see the topic "Attributes Property" in DAO Help.

CDaoTableDef OverviewClass MembersHierarchy Chart

See Also   CDaoTableDef::GetIndexInfo, CDaoTableDef::GetIndexCount, CDaoTableDef::GetFieldCount