Muokkaa

Jaa


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

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

Requirement Value
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