Partager via


CDaoWorkspace::GetWorkspaceInfo

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

void GetWorkspaceInfo( 
   int nIndex, 
   CDaoWorkspaceInfo& wkspcinfo, 
   DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO  
);
void GetWorkspaceInfo( 
   LPCTSTR lpszName, 
   CDaoWorkspaceInfo& wkspcinfo, 
   DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO  
);

Parameters

  • nIndex
    The zero-based index of the database object in the Workspaces collection, for lookup by index.

  • wkspcinfo
    A reference to a CDaoWorkspaceInfo object that returns the information requested.

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

    • AFX_DAO_PRIMARY_INFO   (Default) Name

    • AFX_DAO_SECONDARY_INFO   Primary information plus: User Name

    • AFX_DAO_ALL_INFO   Primary and secondary information plus: Isolate ODBCTrans

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

Remarks

For a description of the information returned in wkspcinfo, see the CDaoWorkspaceInfo 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 prior levels as well.

Requirements

Header: afxdao.h

See Also

Concepts

CDaoWorkspace Class

CDaoWorkspace Members

Hierarchy Chart

CDaoWorkspace::GetWorkspaceCount