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

Database.ApplyTransform method

· 52CE 我爱测

The ApplyTransform method of the Database object applies the transform to this database.

The ApplyTransform method of the Database object applies the transform to this database.

Syntax

Database.ApplyTransform(
  storage,
  errorConditions
)

Parameters

storage

Path to the transform file being applied. This parameter is required.

errorConditions

Specifies the error conditions that are to be suppressed. Specify as a combination of the following integer values.

Error condition Meaning
msiTransformErrorAddExistingRow 0x0001 Adds a row that already exists.
msiTransformErrorDeleteNonExistingRow 0x0002 Deletes a row that does not exist.
msiTransformErrorAddExistingTable 0x0004 Adds a table that already exists.
msiTransformErrorDeleteNonExistingTable 0x0008 Deletes a table that does not exist.
msiTransformErrorUpdateNonExistingRow 0x0010 Updates a row that does not exist.
msiTransformErrorChangeCodePage 0x0020 Transform and database code pages do not match and neither has a neutral code page.
msiTransformErrorViewTransform 0x0100 Creates the temporary _TransformView table.

Return value

This method does not return a value.

Remarks

The ApplyTransform method delays transforming tables until the last possible moment. The steps taken in ApplyTransform are to immediately transform the table and column catalogs for the database. The table and column catalogs are updated according to which table is added or deleted and which column is added (no deletion of columns is allowed). If a table is currently loaded in memory and needs to be transformed, it is transformed. Otherwise, the table state is set to that requiring a transform so that when the table is loaded, or when the database is committed, the transform is applied. Transform in this instance means that the actual (row) data of the table is added, deleted, or updated.

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

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)

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

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