CDaoDatabase::GetQueryDefInfo
Visual Studio 2012
Call this member function to obtain various kinds of information about a query defined in the database.
void GetQueryDefInfo( int nIndex, CDaoQueryDefInfo& querydefinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO ); void GetQueryDefInfo( LPCTSTR lpszName, CDaoQueryDefInfo& querydefinfo, DWORD dwInfoOptions = AFX_DAO_PRIMARY_INFO );
Two versions of the function are supplied so you can select a query either by index in the database's QueryDefs collection or by the name of the query.
For a description of the information returned in querydefinfo, see the CDaoQueryDefInfo structure. This structure has members that correspond to the items of information listed above in the description of dwInfoOptions. If you request one level of information, you get any prior levels of information as well.