GetQMFObjectList()


" "

short GetQMFObjectList(BSTR Owner, BSTR Name, short Type, VARIANT* List, [VARIANT IncludeComment])

Description

This function returns an array of the names (and optionally comments) of all the QMF objects that match the patterns specified in the Owner and Name parameters.

Parameters

Name Description
Owner A string specifying the owner of the objects that you want to include in the returned list.
Name A string specifying the name of the objects that you want to include in the returned list.
Type

Specifies the types of QMF objects that you want to include in the returned list. You can specify multiple object types:

2048 (RSQ_MASK_QUERIES) -- Include QMF queries in the list
1024 (RSQ_MASK_FORMS) -- Include QMF forms in the list
512 (RSQ_MASK_PROCS) -- Include QMF procedures in the list
256 (RSQ_MASK_TABLES) -- Include tables in the list

List

A pointer to a VARIANT in which the result is stored. If the IncludeComment parameter is VT_FALSE, the result is a single-dimensional array of strings (variant type VT_ARRAY | VT_BSTR), each with the format of Owner.Name. If IncludeComment is VT_TRUE, the result is a two-dimensional array of strings. Each row contains the owner and name in the first element, and the comment in the second element. If no matching QMF objects are found, the result is empty (variant type VT_EMPTY). Initialize the VARIANT before calling this function. Visual Basic does this automatically. Visual C++ programmers should call VariantInit().

Note:
Due to a bug in Microsoft Excel 7.0 and Microsoft Access 7.0 (and possibly other 32-bit Microsoft products that use Visual Basic for Applications), string data in Variant variables received from QMF for Windows may not be translated from Unicode (used by OLE) to ANSI (used by VBA). When this occurs, only the first character of the string is displayed. To remedy this problem, set the variable equal to an empty string before you call the QMF for Windows function that uses the variable.
IncludeComment An optional VARIANT specifying whether or not to return the comment for each matching object.

Return Value

The return value will be zero, if successful and non-zero if unsuccessful. If no matching QMF objects are found, the return value is zero. If the return value is non-zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.