>

LogMessages Property

Applies To

QueryDef Object.

Description

Sets or returns a value that specifies if the messages returned from an ODBC database are recorded. This property is user-defined and is read/write once created and installed.

Note

The user must install this property using the CreateProperty method on a QueryDef object.

Settings and Return Values

The setting or return value is a Boolean expression that specifies whether messages are recorded. The data type is Boolean. True indicates that ODBC-generated messages are recorded.

Remarks

Some pass-through queries can return messages in addition to data. If you set the LogMessages property to True (-1), the Microsoft Jet database engine creates a table that contains returned messages. The table name is the user name concatenated with a hyphen (-) and a sequential number starting at 00. For example, because the default user name is ADMIN, the tables returned would be named ADMIN-00, ADMIN-01, and so on.

If you expect the query to return messages, create and append a user-defined LogMessages property for the QueryDef object, and set its type to Boolean and its value to True.

Once you've processed the results from these tables, you may want to delete them from the database along with the temporary query used to create them.