Compartir a través de


CDaoWorkspace::GetDatabaseInfo

Call this member function to obtain various kinds of information about a database open in the workspace.

void GetDatabaseInfo( 
   int nIndex, 
   CDaoDatabaseInfo& dbinfo, 
   DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO  
);
void GetDatabaseInfo( 
   LPCTSTR lpszName, 
   CDaoDatabaseInfo& dbinfo, 
   DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO  
);

Parameters

  • nIndex
    The zero-based index of the database object in the workspace's Databases collection, for lookup by index.

  • dbinfo
    A reference to a CDaoDatabaseInfo object that returns the information requested.

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

    • AFX_DAO_PRIMARY_INFO   (Default) Name, Updatable, Transactions

    • AFX_DAO_SECONDARY_INFO   Primary information plus: Version, Collating Order, Query Timeout

    • AFX_DAO_ALL_INFO   Primary and secondary information plus: Connect

  • lpszName
    The name of the database object, for lookup by name. The name is a string with up to 14 characters that uniquely names the new workspace object.

Remarks

One version of the function lets you look up a database by index. The other version lets you look up a database by name.

For a description of the information returned in dbinfo, see the CDaoDatabaseInfo 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.

Requirements

Header: afxdao.h

See Also

Reference

CDaoWorkspace Class

Hierarchy Chart

CDaoWorkspace::GetDatabaseCount

Other Resources

CDaoWorkspace Members