Share via


QueryDef Object Members

Access Developer Reference

A QueryDef object is a stored definition of a query in a Microsoft Access database engine database.

Methods

  Name Description
Bb243631.methods(en-us,office.12).gif Cancel ODBCDirect workspaces are not supported in Microsoft Office Access 2007. Use ADO if you want to access external data sources without using the Microsoft Access database engine.Cancels execution of a pending asynchronous method call (ODBCDirect workspaces only).
Bb243631.methods(en-us,office.12).gif Close Closes an open QueryDef.
Bb243631.methods(en-us,office.12).gif CreateProperty Creates a new user-defined Property object (Microsoft Access workspaces only).
Bb243631.methods(en-us,office.12).gif Execute Eexecutes an SQL statement on the specified object.
Bb243631.methods(en-us,office.12).gif OpenRecordset Creates a new Recordset object and appends it to the Recordsets collection.

Properties

  Name Description
Bb243631.properties(en-us,office.12).gif CacheSize Sets or returns the number of records retrieved from an ODBC data source that will be cached locally. Read/write Long.
Bb243631.properties(en-us,office.12).gif Connect Sets or returns a value that provides information about the source of database used in a pass-through query. Read-only String.
Bb243631.properties(en-us,office.12).gif DateCreated Returns the date and time that an object was created (Microsoft Access workspaces only). Read-only Variant.
Bb243631.properties(en-us,office.12).gif Fields Returns a Fields collection that represents all stored Field objects for the specified object. Read-only.
Bb243631.properties(en-us,office.12).gif LastUpdated Returns the date and time of the most recent change made to an object. Read-only Variant.
Bb243631.properties(en-us,office.12).gif MaxRecords Sets or returns the maximum number of records to return from a query against an ODBC data source.
Bb243631.properties(en-us,office.12).gif Name Returns or sets the the name of the specified object. Read/write String.
Bb243631.properties(en-us,office.12).gif ODBCTimeout Indicates the number of seconds to wait before a timeout error occurs when a QueryDef is executed on an ODBC database.
Bb243631.properties(en-us,office.12).gif Parameters Returns a Parameters collection that contians all of the Parameter objects of the specified QueryDef. Read-only.
Bb243631.properties(en-us,office.12).gif Prepare ODBCDirect workspaces are not supported in Microsoft Office Access 2007. Use ADO if you want to access external data sources without using the Microsoft Access database engine.Sets or returns a value that indicates whether the query should be prepared on the server as a temporary stored procedure, using the ODBC SQLPrepare API function, prior to execution, or just executed using the ODBC SQLExecDirect API function (ODBCDirect workspaces only). Read/Write QueryDefStateEnum.
Bb243631.properties(en-us,office.12).gif Properties Returns the Properties collection of the specified object. Read-only.
Bb243631.properties(en-us,office.12).gif RecordsAffected Returns the number of records affected by the most recently invoked Execute method.
Bb243631.properties(en-us,office.12).gif ReturnsRecords Sets or returns a value that indicates whether an SQL pass-through query to an external database returns records (Microsoft Access workspaces only).
Bb243631.properties(en-us,office.12).gif SQL Sets or returns the SQL statement that defines the query executed by a QueryDef object.
Bb243631.properties(en-us,office.12).gif StillExecuting ODBCDirect workspaces are not supported in Microsoft Office Access 2007. Use ADO if you want to access external data sources without using the Microsoft Access database engine.Indicates whether or not an asynchronous operation (that is, a method called with the dbRunAsync option) has finished executing (ODBCDirect workspaces only).
Bb243631.properties(en-us,office.12).gif Type Sets or returns a value that indicates the operational type or data type of an object. Read-onlyInteger.
Bb243631.properties(en-us,office.12).gif Updatable Returns a value that indicates whether you can change a DAO object. Read-only Boolean.