Database.ApplyTransform method

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

Syntax


Database.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 conditionMeaning
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

Version

Windows Installer 5.0 on Windows Server 2012, Windows 8, 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 or Windows XP

DLL

Msi.dll

IID

IID_IDatabase is defined as 000C109D-0000-0000-C000-000000000046

See also

Database
Database Transforms

 

 

Show: