MsiViewExecute

[This is preliminary documentation and subject to change.]

The MsiViewExecute function executes the view query, supplying parameters as required.

UINT MsiViewExecute(
  MSIHANDLE hView,    // view handle
  MSIHANDLE hRecord   // parameter record
);
 

Parameters

hView
Handle to the view upon which to execute the query.
hRecord
Handle to a record that supplies parameters as required. This parameter contains values to replace parameter markers in the SQL query. It is optional, so hRecord can be zero. For a reference on syntax, see SQL Syntax.

Return Values

ERROR_FUNCTION_FAILED
A view could not be executed.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_SUCCESS
The function succeeded.

Remarks

The MsiViewExecute function must be called before any calls to MsiViewFetch. If the SQL query specifies values in the predicate expression with parameter markers, a record with all replacement values in exact order and of compatible data types must be supplied.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.

See Also

Database Access Reference, General Database Access Functions