The "Column" Command |
Before MAKEMSI can refer to a table it needs to know some information about it. This applies to standard MSI tables or any that you might wish to create for your own uses.
This command defines a single table column for the table definition started by the "TableDefinition" command. Some information is recorded in "Column Macros" which you can refer to in your script.
The order of the columns is significant and should match that of the MSI tables being defined. Note that you must follow any MSI restrictions that are in place, for example primary fields must be defined first.
This command takes these parameters:
Some examples:
The "TableExportToIdt" command can be used to export existing tables. The "type" information for a tables column will be on the second line of each ".IDT" file.
The format is described in "MSI.CHM" in the page titled "Column Definition Format" (available online).
Note that for your own custom tables you will probably also wish to add entries to the "_Validation" table so as to perform as tight a validation as possible (and also preventing validation errors about missing validations!).
Note that the above information can be obtained by exporting existing tables with "ORCA" and looking at the first 3 lines (the IDT format is relatively obvious and is poorly documented in "MSI.CHM").
EXAMPLE |
This example shows the definitions for the standard "Binary" and "File" tables:
<$TableDefinition "Binary"> <$Column "Name" TYPE="s72" KEY="Y"> ;;Max 72 Characters <$Column "Data" TYPE="v0"> ;;Binary field (unlimited length) <$/TableDefinition> <$TableDefinition "File"> <$Column "File" TYPE="s72" KEY="Y"> <$Column "Component_" TYPE="s72"> <$Column "FileName" TYPE="l255"> <$Column "FileSize" TYPE="i4"> <$Column "Version" TYPE="S72"> <$Column "Language" TYPE="S20"> <$Column "Attributes" TYPE="I2"> <$Column "Sequence" TYPE="i2"> <$/TableDefinition> ;--- Define an internal MAKEMSI table --------------------------------------- <$TableDefinition "MAKEMSI_FileSource"> <$Column "File_" TYPE="s72" KEY="Y"> <$Column "SourceFile" TYPE="s255"> <$/TableDefinition> <$TableCreate "MAKEMSI_FileSource"> <$Table "_Validation"> #( <$Row Table="MAKEMSI_FileSource" Column="File_" Nullable="N" KeyTable="File" KeyColumn="1" Category="Identifier" Description="Foreign key into the File table." > #) #( <$Row Table="MAKEMSI_FileSource" Column="SourceFile" Nullable="N" Category="Text" Description="Full name of source file." > #) <$/Table>