MsiDatabaseApplyTransform

[This is preliminary documentation and subject to change.]

The MsiDatabaseApplyTransform function applies a transform to a database.

UINT MsiDatabaseApplyTransform(
  MSIHANDLE hDatabase,     // database handle
  LPCTSTR szTransformFile, // name of transform file
  int iErrorConditions     // error conditions to be suppressed
);
 

Parameters

hDatabase
Handle to database to transform.
szTransformFile
Specifies the name of the transform file to apply.
iErrorConditions
Error conditions that should be suppressed. This parameter (can or must) be (one, any, one or more) of the following values.
Value Meaning
0x0001 Adding a row that already exists.
0x0002 Deleting a row that doesn't exist.
0x0004 Adding a table that already exists.
0x0008 Deleting a table that doesn't exist.
0x0010 Updating a row that doesn't exist.

Return Values

ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_INSTALL_TRANSFORM_FAILURE
The transform could not be applied.
ERROR_OPEN_FAILED
The transform storage file could not be opened.
ERROR_SUCCESS
The function succeeded.

Remarks

The MsiDatabaseApplyTransform function delays transforming tables until it is necessary. Any tables to be added or dropped are processed immediately. However, changes to the existing table are delayed until the table is loaded or the database is committed.

An error occurs if MsiDatabaseApplyTransform is called when tables have already been loaded and saved to storage.

Since the list delimiter for transforms, sources and patches is a semicolon, this character should not be used for filenames or paths.

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.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Database Management Functions