Database Manipulation

<< Click to Display Table of Contents >>

RayPack > 8.0 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Advanced Mode > Tables 

Database Manipulation

Packagers require full control over the actual database contents of any packaging project. Therefore, database manipulation via direct table access must be available in a simple, yet comprehensive way. An elaborated set of database manipulation options has been molded into RayPack's direct table editor. Besides many advanced features that support the maintenance of data integrity and validity, basic manipulation features, such as adding and removing tables and rows as well as editing of cells, are fully supported.

To Add a Table

Within RayPack, and to be even more precise, within RayPack packaging projects, there are different types of tables available for integration into the active database. Users may manually add a table to an existing packaging project by selecting one of the prepared tables from the pool of generally available tables.

 

As an alternative, RayPack adds standard tables from the prepared stock, or custom tables for RayPack specific functionality, right when they are required to implement a specific packaging task, such as creating a TXT changes job, or manipulating a service object on the target machine.

 

papercliper

Note:

Adding new tables, which were not represented in the MSI template that has originally been used to initialize the default data structure during the project creation, is not feasible via the table editor. Changes to the default stock of available database tables have to be prepared in the default MSI template used to initiate packaging projects (or to generate MSI packages from RCP files). Please refer to the help section regarding profile and template management to get a detailed description on how to accomplish template preparation.

 

To Manually Add a Table From the Pool of Template-based Standard Tables:

1.Packagers have to open the TABLES view in PackDesigner's Advanced Mode.
 

2.A list of already added tables is displayed on the left-hand side of the application window. Above that list there is the activity bar for the table editor. Within that bar there is an add button (+), which has to be clicked.
 

newrowbutton

 

The ADD TABLE dialog for adding prepared tables to an Installer database is opened.
 

3.To select a table from that list, users activate the checkbox on the left hand side of the needed table name.
The selection may include one or more tables.
 

4.To create the table(s), users click the OK button at the bottom of the dialog window. The marked tables will immediately be added to the project. Additionally, the TABLES view is automatically reloaded to show the newly added tables, and the ADD TABLE dialog is closed.
 
In order to close the ADD TABLE dialog without actually adding a table to the project database, the CANCEL button has to be clicked.

To Add Rows to a Table

As soon as a table has been added to the projects database, new rows may be added to them directly.
 

1.First of all, the table that has to be extended with a new row must be loaded into the details pane of the TABLES view. To do so, users click on the table name from the list of database tables.
 
If the name of the desired table is not listed, the table may either be empty and hidden, or may not have been added to the project yet. Please refer to the specific help topics to find out how to solve these issues.
 

2.Once the table is selected from the list, its content is loaded into the details pane. For complex tables with voluminous content, the data loading process may take a few moments.
 

3.As soon as the details pane displays the table content, users may click on the add (+) button within the action bar above the details pane.
 

4.

newrowbutton2

 
A NEW ROW dialog is displayed.
 

5.RayPack automatically adjusts the set of displayed input controls to match the column structure of the currently focused table. Adjusting in this case does not only mean to show the right input fields, but also to prepare selector controls for columns that establish relations to other tables (usually marked in the column name with an underscore at the end of the column name, e. g. "Component_" for columns that expect a value that is a primary key of the Component table).
 

6.The labels and expected data types of the table columns are displayed on the left hand side of the ADD ROW dialog, the actual input controls are on the right. Inputs that are marked with a red border and background color are mandatory and have to be filled with valid data.
 

7.If there are missing or invalid inputs, a message bar at the bottom of the ADD ROW dialog is displayed, explaining the issue that needs to be solved before the new row can be added to the table.
 

8.Once all red markers and error messages are gone, users may add the new row with a click on the OK button, available at the bottom of the dialog window.
 
To exit the dialog without attempting to add the new row, users click on the CANCEL button right next to OK.

 

Adding a row to a table is a data manipulation that is temporary until the current packaging project status is saved. Therefore, newly added rows are marked within database tables with a special icon (a pencil with plus sign) and color coding (green background color for table and row).

To Copy and Paste Table Rows

Within the TABLES editor, RayPack allows to cut, copy and paste single rows of database tables.

 

To copy a row to clipboard, users load the table into the details pane of the TABLES editor.

With a right-click on any of the displayed rows, the context menu with the copy option is revealed. As an alternative, users may also select a row and use the keyboard shortcut Control + C to trigger the copy procedure.

 

To cut a row from a table and copy its contents into the clipboard, users load the table into the details pane of the TABLES editor.

With a right-click on any of the displayed rows, the context menu with the cut option is revealed. As an alternative, users may also select a row and use the keyboard shortcut Control + X to trigger the cut procedure.

 

As soon as a row is copied or cut, users may paste it from the clipboard. With a right-click somewhere inside the tables details pane, the context menu with the paste option is revealed. As an alternative, users may also select any of the existing rows within the table and use the keyboard shortcut Control + V to trigger the cut procedure.

 

Rows can be pasted back into the original table within the TABLES editor:

If the initial procedure was a copy, a second row will be inserted into the table, matching the properties of the copy master.

If cut was used to transfer row data to the clipboard, the original row will be replaced by the paste command. This is quite handy if a row has accidentally been removed and has to be restored.

 

As an alternative, rows may also be pasted into any other file for external usage, e. g. a .txt file, or an excel sheet. Pasting into the same table of another packaging project opened in another instance of RayPack is possible as well. However, it is not allowed to copy (or cut) and paste between different tables of a packaging project (e. g. from File to Component), since the table definitions of these targets are not equal.

To Edit Table Rows

As soon as a table has been added to a projects database and populated with data, users may edit each single cell.
 

1.First of all, the table that contains the row which has to be edited must be loaded into the details pane of the TABLES view. To do so, users click on the table name from the list of database tables.
 
If the name of the desired table is not listed, the table may either be empty and hidden, or has not been added to the project yet. Please refer to the specific help topics to find out how to solve these issues.
 

2.Once the table is selected from the list, its content is loaded into the details pane. For complex tables with voluminous content, the data loading process may take a few moments.
 

3.In RayPack, users manipulate individual data columns in a direct inline editor. There is no additional dialog that pops out, containing input controls for all columns of the specific table.
 
The RayPack table editor interface reacts on double clicks on a specific cell, switching from view into direct inline edit mode. The same can be achieved by clicking a cell and hitting F2 on the keyboard.
 
The current cell content is automatically marked, therefore simply starting to type replaces the existing value. To partially change existing values, users should move the cursor to the desired position first, and then start to enter the additional content. The same should be done for partial deletions. Move the cursor to the right position and hit Backspace or Delete on the keyboard.
 

4.Users may hit Enter to attempt to save the updated value, or use the Tab key to move to the next cell and automatically activate the direct inline edit mode for that one.
 
If the changes made to a value are invalid, the associated cell is highlighted with an exclamation mark icon. Hovering over that error icon reveals a tooltip with hints on the issue that prevents the changes from being valid.
 
If the changes are actually valid, the modified cell is highlighted with green background color. The table row containing the updated cell is marked with a pencil icon which is displayed left of it.

To Remove Rows From a Table

As soon as a table has been added to a projects database and populated with data, users may manipulate the rows it contains.
 

1.First of all, the table that contains the row which is about to be deleted must be loaded into the details pane of the TABLES view. To do so, users click on the table name from the list of database tables.
 
If the name of the desired table is not listed, the table may either be empty and hidden, or has not been added to the project yet. Please refer to the specific help topics to find out how to solve these issues.
 

2.Once the table is selected from the list, its content is loaded into the details pane. For complex tables with voluminous content, the data loading process may take a few seconds.
 

3.To remove a row from the currently loaded table, users right-click somewhere inside the desired row, and select Remove from the context menu. Of course, selecting the row with a left-click and hitting Delete on the keyboard will lead to the very same result.
 
It is also possible to multi-select a whole set of table rows and delete them in one step. Keep the Control key pressed while clicking on several rows to multi-select them, or use standard windows selection options such as Control + A (to select all rows of a table), or Shift (to select a group of adjacent rows) to gather the required set of selected rows.
 

4.Once a table row is removed this way, it is marked as deleted within the table editor interface: It has a gray background color and a pencil with a minus as status icon on the left-hand side. In this state the row is finally deleted from the project as soon as the user closes the project, or manually clears the change history.
 
Until that moment, users may restore deleted rows by right-clicking them, selecting copy from the context menu, and after another right-click somewhere in the details pane of the table, select paste from the context menu. (Left-clicking a row and using the shortcuts Control + C for copy and Control + V for paste will work as well) The row is restored, displayed in standard colors and without the removal flag icon.

To Remove a Table

As soon as a table has been added to a projects database, users may remove it from the active pool of tables.
 

1.First of all, the table that is about to be deleted must be visible in the list of project database tables on the left-hand side of the TABLES view.
 
If the name of the desired table is not listed, the table may either be empty and hidden, or has not been added to the project yet. Please refer to the specific help topics to find out how to solve these issues.
 

2.To remove a table from the stock of active project database tables, it has to be right-clicked within the listing of database-tables on the left-hand side of the TABLES view. The context menu reveals the Delete option for tables.
 

3.Once remove is selected from the context menu, RayPack displays a confirm dialog.
Click YES to remove the table, or NO to keep it as it is.
 

4.If the user clicks YES, the table (and along with it all rows it contains) is removed.

 

Once a table is removed from the pool of active project database tables, it is available for readding via the add table dialog if it is part of the template based stock of prepared database tables for a packaging project. Please refer to the help topic above to get details regarding the add table procedure.

 

papercliper

Note:

Please be aware that removing a table cannot be reverted. This means that even if a table will be added to a project again, the data it contained before its removal is and stays gone.

 

To Restore Changes to the Original State

Once a cell, row or a table is highlighted green, it is an indication that a change has been made and that the original state is stored by RayPack. You can easily revert to the base state by accessing the context menu functionality Revert to base. The behavior of this action is different, depending on the context:

 

Reverting a newly created row deletes it.

Reverting a deleted row restores it.

Reverting changed cells revert their values to the original state.

Reverting a newly added table removes it.

Reverting a deleted table restores it.

Reverting a changed row reverts all changed cells to their original values.

Reverting a changed table restores all its deleted rows, deletes new rows, and restores the modified row cells to their original state.

 

Context menu has an option to revert a cell, row or table to the original state.

Context menu has an option to revert a cell, row or table to the original state.

 

Chapter Change Tracking also describes how the change tracking works and how to reset the changes.
 

To View Help for a Selected Table

A contextual HTML help for the currently selected table can be shown by pressing F1 in the Advanced view. This will open an official documentation created by Microsoft and available on MSDN help topic.