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

Naming Primary Keys in Merge Module Databases

· 52CE 我爱测

The names of primary keys a merge module database must adhere to a standard naming convention.

The names of primary keys a merge module database must adhere to a standard naming convention. The purpose of this naming convention is to reduce the possibility of creating a name conflict between the table columns in the merge module and the target installation package. The naming convention cannot be applied to tables in which the primary key is installable data. Do not apply the naming convention to the following tables:

For example, do not use for the primary key of the MIME table because this is the MIME type and applying the naming procedure would change its meaning. In these cases, name conflicts depend on the meaning of the data being unique across modules.

The name of a primary key in a merge module must consist of a readable name appended with a string made from the merge module's GUID. Every merge module must have its own GUID. The merge module's GUID should also be authored into the Revision Number Summary property of the merge module. Developers can create GUIDs using a utility such as GUIDGEN.

The following procedure describes how to generate a primary database key that adheres to the standard naming convention. Apply the following procedure only to tables where the primary key is not data being installed.

To name a primary key of a table record in a merge module

  1. Author the readable part of the name for the primary key. Pick a readable name that identifies this record, for example, MyRowEntry.
  2. Generate or obtain the GUID of the merge module. Note that all GUIDs must be authored in uppercase. For more information about GUIDs, see GUID. The following is an example of a GUID: {880DE2F0-CDD8-11D1-A849-006097ABDE17}. In the following steps you modify this into a character string that must be appended to every primary key name in the merge module.
  3. Remove the curly braces from the beginning and end of the GUID.
  4. Change all the dashes to underscores.
  5. Append the result to the end of the readable part of the primary key name. Separate the readable name from the modified GUID by a period. The primary key name for the example GUID given above becomes MyRowEntry.880DE2F0_CDD8_11D1_A849_006097ABDE17.
  6. Repeat to name all the primary keys of all tables in the merge module.

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)

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

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