Database.ApplyTransform Method

Windows Installer

Database.ApplyTransform Method

The ApplyTransform method of the Database object applies the transform to this database.

Syntax

Script
ApplyTransform(
  storage,
  errorConditions
)

Parameters

storage

Path to the transform file being applied. This parameter is required.

errorConditions

Specifies the error conditions that are to be suppressed. Specify as a combination of the following integer values.

Error condition Meaning
msiTransformErrorAddExistingRow
0x0001

Adds a row that already exists.

msiTransformErrorDeleteNonExistingRow
0x0002

Deletes a row that does not exist.

msiTransformErrorAddExistingTable
0x0004

Adds a table that already exists.

msiTransformErrorDeleteNonExistingTable
0x0008

Deletes a table that does not exist.

msiTransformErrorUpdateNonExistingRow
0x0010

Updates a row that does not exist.

msiTransformErrorChangeCodePage
0x0020

Transform and database code pages do not match and neither has a neutral code page.

msiTransformErrorViewTransform
0x0100

Creates the temporary _TransformView table.

 

Return Value

This method does not return a value.

Remarks

The ApplyTransform method delays transforming tables until the last possible moment. The steps taken in ApplyTransform are to immediately transform the table and column catalogs for the database. The table and column catalogs are updated according to which table is added or deleted and which column is added (no deletion of columns is allowed). If a table is currently loaded in memory and needs to be transformed, it is transformed. Otherwise, the table state is set to that requiring a transform so that when the table is loaded, or when the database is committed, the transform is applied. Transform in this instance means that the actual (row) data of the table is added, deleted, or updated.

If the method fails, you can obtain extended error information by using the LastErrorRecord method.

Requirements

VersionWindows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000
DLLMsi.dll
IIDIID_IDatabase is defined as 000C109D-0000-0000-C000-000000000046

See Also

Database
Database Transforms

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.