CDaoTableDef::DeleteField

void DeleteField( LPCTSTR lpszName );
throw( CDaoException, CMemoryException );

void DeleteField( int nIndex );
throw( CDaoException, CMemoryException );

Parameters

lpszName

A pointer to a string expression that is the name of an existing field.

nIndex

The index of the field in the table’s zero-based Fields collection, for lookup by index.

Remarks

Call this member function to remove a field and make it inaccessible. You can use this member function on a new object that has not been appended to the database or when CanUpdate returns nonzero.

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 "Delete Method" in DAO Help.

CDaoTableDef OverviewClass MembersHierarchy Chart

See Also   CDaoTableDef::CreateField, CDaoTableDef::CreateIndex, CDaoTableDef::DeleteIndex