Udostępnij za pośrednictwem


CDaoQueryDef::GetType

Call this member function to determine the query type of the querydef.

short GetType( );

Return Value

The type of the query defined by the querydef. For values, see Remarks.

Remarks

The query type is set by what you specify in the querydef's SQL string when you create the querydef or call an existing querydef's SetSQL member function. The query type returned by this function can be one of the following values:

  • dbQSelect   Select

  • dbQAction   Action

  • dbQCrosstab   Crosstab

  • dbQDelete   Delete

  • dbQUpdate   Update

  • dbQAppend   Append

  • dbQMakeTable   Make-table

  • dbQDDL   Data-definition

  • dbQSQLPassThrough   Pass-through

  • dbQSetOperation   Union

  • dbQSPTBulk   Used with dbQSQLPassThrough to specify a query that does not return records.

Note

To create a SQL pass-through query, don't set the dbSQLPassThrough constant. This is set automatically by the Microsoft Jet database engine when you create a querydef object and set the connection string.

For information about SQL strings, see GetSQL. For information about query types, see Execute.

Requirements

Header: afxdao.h

See Also

Reference

CDaoQueryDef Class

Hierarchy Chart

Other Resources

CDaoQueryDef Members