大网数据广告活动
安装更新与部署

Database.CreateTransformSummaryInfo method

· 52CE 我爱测

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.

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

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。