Redigera

Dela via


_TransformView Table

This is a read-only temporary table used to view transforms with the transform view mode. This table is never persisted by the installer.

To invoke the transform view mode, obtain a handle and open the reference database. See Obtaining a Database Handle. Call MsiDatabaseApplyTransform with MSITRANSFORM_ERROR_VIEWTRANSFORM. This stops the transform from being applied to the database and dumps the transform contents into the _TransformView table. The data in the table can be accessed using SQL queries. See Working with Queries.

The _TransformView table is not cleared when another transform is applied. The table reflects the cumulative effect of successive applications. To view the transforms separately you must release the table.

The _TransformView Table has the following columns.

Column Type Key Nullable
Table Identifier Y N
Column Text Y N
Row Text Y Y
Data Text N Y
Current Text N Y

Column

Table

Name of an altered database table.

Column

Name of an altered table column or INSERT, DELETE, CREATE, or DROP.

Row

A list of the primary key values separated by tabs. Null primary key values are represented by a single space character. A Null value in this column indicates a schema change.

Data

Data, name of a data stream, or a column definition.

Current

Current value from reference database, or column a number.

Remarks

The _TransformView is held in memory by a lock count, that can be released with the following SQL command.

"ALTER TABLE _TransformView FREE".

The data in the table can be accessed using SQL queries. The SQL language has two main divisions: Data Definition Language (DDL) that is used to define all the objects in an SQL database, and Data Manipulation Language (DML) that is used to select, insert, update, and delete data in the objects defined using DDL.

The Data Manipulation Language (DML) transform operations are indicated as follows. Data Manipulation Language (DML) are those statements in SQL that manipulate, as opposed to define, data.

Transform operation SQL result
Modify data {table} {column} {row} {data} {current value}
Insert row {table} "INSERT" {row} NULL NULL
Delete row {table} "DELETE" {row} NULL NULL

The Data Definition Language (DDL) transform operations are indicated as follows. Data Definition Language (DDL) are those statements in SQL that define, as opposed to manipulate, data.

Transform operation SQL result
Add column {table} {column} NULL {defn} {column number}
Add table {table} "CREATE" NULL NULL NULL
Drop table {table} "DROP" NULL NULL NULL

When the application of a transform adds this table, the Data field receives text that can be interpreted as a 16-bit integer value. The value describes the column named in the Column field. You can compare the integer value to the constants in the following table to determine the definition of the altered column.

Bit Description
Bits 0 7
Hexadecimal: 0x0000 0x0100
Decimal: 0 255
Column width
Bit 8
Hexadecimal: 0x0100
Decimal: 256
A persistent column. Zero means a temporary column.
Bit 9
Hexadecimal: 0x0200
Decimal: 1023
A localizable column. Zero means the column cannot be localized.
Bits 10 11
Hexadecimal: 0x0000
Decimal: 0
Long integer
Hexadecimal: 0x0400
Decimal: 1024
Short integer
Hexadecimal: 0x0800
Decimal: 2048
Binary object
Hexadecimal: 0x0C00
Decimal: 3072
String
Bit 12
Hexadecimal: 0x1000
Decimal: 4096
Nullable column. Zero means the column is non-nullable.
Bit 13
Hexadecimal: 0x2000
Decimal: 8192
Primary key column. Zero means this column is not a primary key.
Bits 14 15
Hexadecimal: 0x4000 0x8000
Decimal: 16384 32768
Reserved

For a script sample that demonstrates the _TransformView table, see View a Transform.