|
Go to: |
Databases, New Virtual Primary Key... |
In many cases, Iron Speed Designer cannot create certain pages that require primary keys, such as Edit Record and Show Record pages. This occurs because the associated database tables and views used in your application do not have primary keys designated in the underlying database. This also applies to queries created in Iron Speed Designer which do not have designated primary keys.

For database tables, database views and queries that do not have explicitly defined primary keys, you can specify ‘virtual’ primary key relationships in Iron Speed Designer, allowing you to create Edit Record and Show Record pages (and others) for these tables. You don’t have to change your database schema in order to generate full-featured applications.
Virtual primary keys provide all of the benefits of a real primary key (explicitly declared within the database) to a database table or database view:
Physical tables: Virtual primary keys allow you to create Edit Record, Show Record, Show Table and Edit Table pages.
Database views: Virtual primary keys allow you to create Show Record and Show Table pages and, in many cases Edit Record pages.
Custom queries: Virtual primary keys allow you to create Edit Record, Show Record, Show Table and Edit Table pages.
Virtual primary keys have several additional benefits:
Images in tables with virtual primary keys can be displayed, since binary database images can only be displayed for tables with primary keys. This overcomes a limitation resulting from technical issues involving HTML/HTTP capabilities.
Improving the accuracy of the table's default keys (implicit IDs) and decreasing the size of each record's default key for many tables, views, and custom queries. This improves the run-time performance of Show Table pages and decreases the size of the ViewState for such pages.
You can also add virtual primary keys in the Field Display Properties dialog, accessible from either the Databases folder in the Application Explorer or the Properties dialog.

To create a composite virtual primary key, check the “Virtual primary key” box for each field in the composite primary key.
Virtual primary keys cannot be added to physical tables that already have a physical primary key. Tables cannot have multiple primary keys, either physical or virtual.
Database and Data Model Enhancement
Adding Virtual Primary Key Relationships
Adding Virtual Foreign Key Relationships
Incorporating Database Schema Changes
Setting Field Display and Data Validation Options
Primary and Foreign Key Options