GenerateTransform Method (referenceDatabase, transformFile)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation GenerateTransform Method (referenceDatabase, transformFile)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseGenerateTransform(Database, String)
Creates a transform that, when applied to the object database, results in the reference database.
Declaration Syntax
C# Visual Basic Visual C++
public bool GenerateTransform(
	Database referenceDatabase,
	string transformFile
)
Public Function GenerateTransform ( 
	referenceDatabase As Database,
	transformFile As String
) As Boolean
public:
bool GenerateTransform(
	Database^ referenceDatabase, 
	String^ transformFile
)
Parameters
referenceDatabase (Database)
Database that does not include the changes
transformFile (String)
Name of the generated transform file, or null to only check whether or not the two database are identical
Return Value
Boolean
true if a transform is generated, or false if a transform is not generated because there are no differences between the two databases.
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.

If the transform is to be applied during an installation you must use the CreateTransformSummaryInfo(Database, String, TransformErrors, TransformValidations) method to populate the summary information stream.

Win32 MSI API: MsiDatabaseGenerateTransform

Exceptions
Exception Condition
InstallerException the transform could not be generated
InvalidHandleException a Database handle is invalid

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)