Database.GenerateTransform Method

Windows Installer

Database.GenerateTransform Method

The GenerateTransform method of the Database object creates a transform that, when applied to the object database, results in the reference database. The transform is stored in the storage object.

If the transform is to be applied during an installation you must use the CreateTransformSummaryInfo method to populate the summary information stream.

Syntax

Script
GenerateTransform(
  reference,
  storage
)

Parameters

reference

Required database that does not include the changes.

storage

The name of the generated transform file. This is optional.

Return Value

This method does not return a value.

Remarks

A transform can add non-primary key columns to the end of a table. A transform cannot be created that adds primary key columns to a table. A transform cannot be created that changes the order, names, or definitions of columns.

This method returns a Boolean value. It returns TRUE if a transform is generated. It returns FALSE if a transform is not generated because there are no differences between the two databases. If the method fails, it generates an error.

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.