CDaoDatabase::GetTableDefInfo

void GetTableDefInfo( int nIndex, CDaoTableDefInfo& tabledefinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
throw( CDaoException, CMemoryException );

void GetTableDefInfo( LPCTSTR lpszName, CDaoTableDefInfo& tabledefinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
throw( CDaoException, CMemoryException );

Parameters

nIndex

The index of the tabledef object in the database’s TableDefs collection, for lookup by index.

tabledefinfo

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

dwInfoOptions

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

lpszName

The name of the tabledef object, for lookup by name.

Remarks

Call this member function to obtain various kinds of information about a table defined in the database. Two versions of the function are supplied so you can select a table either by index in the database’s TableDefs collection or by the name of the table.

For a description of the information returned in tabledefinfo, see the CDaoTableDefInfo structure. This structure has members that correspond to the items of information listed above in the description of dwInfoOptions. If you request information at one level, you get information for any prior levels as well.

! WARNING   The AFX_DAO_ALL_INFO option provides information that can be slow to obtain. In this case, counting the records in the table could be very time consuming if there are many records.

For more information about tables and tabledef objects, see the article DAO TableDef in Visual C++ Programmer's Guide.

CDaoDatabase OverviewClass MembersHierarchy Chart

See Also   CDaoDatabase::GetTableDefCount