Lue englanniksi Muokkaa

Jaa


Database.CreateTransformSummaryInfo method

The CreateTransformSummaryInfo method of the Database object creates and populates the summary information stream of an existing transform file. This method fills in the properties with the base and reference ProductCode and ProductVersion.

Syntax

Database.CreateTransformSummaryInfo(
  reference,
  storage,
  errorConditions,
  validation
)

Parameters

reference

Required database that does not include the changes.

storage

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

errorConditions

Required error conditions that should be suppressed when the transform is applied. Combine one or more of the following error condition values.

Error condition name Meaning
msiTransformErrorNone
0
None of the following conditions.
msiTransformErrorAddExistingRow
1
Adds a row that already exists.
msiTransformErrorDeleteNonExistingRow
2
Deletes a row that does not exist.
msiTransformErrorAddExistingTable
4
Adds a table that already exists.
msiTransformErrorDeleteNonExistingTable
8
Deletes a table that does not exist.
msiTransformErrorUpdateNonExistingRow
16
Updates a row that does not exist.
msiTransformErrorChangeCodepage
32
Transform and database code pages do not match and neither code page is neutral.

validation

Required when the transform is applied to a database; shows which properties should be validated to verify that this transform can be applied to the database. The properties are all contained in the Summary Information Stream Property Set.

Combine one or more of the following values.

Validation flag Meaning
msiTransformValidationNone
0
No validation done.
msiTransformValidationLanguage
1
Default language must match base database.
msiTransformValidationProduct
2
Product must match base database.

To validate product version, first choose one or more of these three flags to indicate how much of the version is to be verified.

Validation flag Meaning
msiTransformValidationMajorVer
8
Checks major version only.
msiTransformValidationMinorVer
16
Checks major and minor version only.
msiTransformValidationUpdateVer
32
Checks major, minor, and update versions.

Then choose one of the following to indicate the required relationship between the product version of the database the transform is being applied to and that of the base database.

Validation flag Meaning
msiTransformValidationLess
64
Applied version < base version
msiTransformValidationLessOrEqual
128
Applied version <= base version
msiTransformValidationEqual
256
Applied version = base version
msiTransformValidationGreaterOrEqual
512
Applied version >= base version
msiTransformValidationGreater
1024
Applied version > base version

To validate that the transform is being applied to a package having the appropriate UpgradeCode, set the following flag.

Validation flag Meaning
msiTransformValidationUpgradeCode
2048
Validates that the transform is the appropriate UpgradeCode.

Return value

This method does not return a value.

Remarks

To create a summary information stream for a transform, the ProductCode and ProductVersion properties must be defined in the Property tables of both the base and reference databases. If msiTransformValidationUpgradeCode is used, the UpgradeCode property must be defined in both databases.

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 Transforms