Data Members
| m_pDatabase | A pointer to the CDaoDatabase object with which the querydef is associated. The querydef might be saved in the database or not. | 
| m_pDAOQueryDef | A pointer to the OLE interface for the underlying DAO querydef object. | 
Construction
| CDaoQueryDef | Constructs a CDaoQueryDef object. Next call Open or Create, depending on your needs. | 
| Create | Creates the underlying DAO querydef object. Use the querydef as a temporary query, or call Append to save it in the database. | 
| Append | Appends the querydef to the database’s QueryDefs collection as a saved query. | 
| Open | Opens an existing querydef stored in the database’s QueryDefs collection. | 
| Close | Closes the querydef object. Destroy the C++ object when you finish with it. | 
| Attributes | |
| CanUpdate | Returns nonzero if the query can update the database. | 
| GetConnect | Returns the connect string associated with the querydef. The connect string identifies the data source. (For SQL pass-through queries only; otherwise an empty string.) | 
| GetDateCreated | Returns the date the saved query was created. | 
| GetDateLastUpdated | Returns the date the saved query was last updated. | 
| GetName | Returns the name of the querydef. | 
| GetODBCTimeout | Returns the timeout value used by ODBC (for an ODBC query) when the querydef is executed. This determines how long to allow for the query’s action to complete. | 
| GetRecordsAffected | Returns the number of records affected by an action query. | 
| GetReturnsRecords | Returns nonzero if the query defined by the querydef returns records. | 
| GetSQL | Returns the SQL string that specifies the query defined by the querydef. | 
| GetType | Returns the query type: delete, update, append, make-table, and so on. | 
| IsOpen | Returns nonzero if the querydef is open and can be executed. | 
| SetConnect | Sets the connect string for an SQL pass-through query on an ODBC data source. | 
| SetName | Sets the name of the saved query, replacing the name in use when the querydef was created. | 
| SetODBCTimeout | Sets the timeout value used by ODBC (for an ODBC query) when the querydef is executed. | 
| SetReturnsRecords | Specifies whether the querydef returns records. Setting this attribute to TRUE is only valid for SQL pass-through queries. | 
| SetSQL | Sets the SQL string that specifies the query defined by the querydef. | 
Operations
| Execute | Executes the query defined by the querydef object. | 
| GetFieldCount | Returns the number of fields defined by the querydef. | 
| GetFieldInfo | Returns information about a specified field defined in the query. | 
| GetParameterCount | Returns the number of parameters defined for the query. | 
| GetParameterInfo | Returns information about a specified parameter to the query. | 
| GetParamValue | Returns the value of a specified parameter to the query. | 
| SetParamValue | Sets the value of a specified parameter to the query. | 
CDaoQueryDef Overview | Base Class Members | Hierarchy Chart