CDaoQueryDef::CDaoQueryDef

CDaoQueryDef( CDaoDatabase* pDatabase );

Parameters

pDatabase

A pointer to an open CDaoDatabase object.

Remarks

Constructs a CDaoQueryDef object. The object can represent an existing querydef stored in the database’s QueryDefs collection, a new query to be stored in the collection, or a temporary query, not to be stored. Your next step depends on the type of querydef:

To set the attributes of the querydef, you can use the SetName, SetSQL, SetConnect, SetODBCTimeout, and SetReturnsRecords member functions.

When you finish with the querydef object, call its Close member function. If you have a pointer to the querydef, use the delete operator to destroy the C++ object.

For information about querydefs, see the article DAO Querydef in Visual C++ Programmer's Guide.

CDaoQueryDef OverviewClass MembersHierarchy Chart

See Also   CDaoQueryDef::GetConnect, CDaoQueryDef::GetDateCreated, CDaoQueryDef::GetDateLastUpdated, CDaoQueryDef::GetName, CDaoQueryDef::GetODBCTimeout, CDaoQueryDef::GetReturnsRecords, CDaoQueryDef::GetSQL