Setting Field Display and Data Validation Options

Go to:

Application Explorer, Databases folder

In most real-world databound web-based applications, a significant portion of an application’s actual usage involves data entry and maintenance by users.  Because users always make mistakes, developers have grown accustomed to using strongly typed data objects and associated validation logic to help ensure data integrity.

While such an approach is mandated by design sense and best practices, time and budget pressures can cause developers to cut corners.  In such scenarios, developers can be intimidated by the massive prospect of adding type-checking and data validation logic to hundreds, if not thousands, of HTML forms.

Still, when shortcuts are taken and applications go into production without the appropriate data validation logic in place, the results can be disastrous.  Over time, once-valuable data assets can be corrupted with data that’s riddled with mistakes, typos, and errors.  The costs associated with cleaning up this data can outweigh the value of the data itself.

To give developers an easy solution to this problem, Iron Speed Designer generates applications with strongly typed data access objects.  The generated code takes advantage of the data types specified in the database to generate specific access functions that are strongly typed.  Moreover, applications built using Iron Speed Designer can use a variety of built-in data field validation types and their corresponding data input validation.  Developers can specify these advanced field validation types in Iron Speed Designer, and the generated code will use this type when generating the database access code.

Set database table-related settings in the Databases folder.  These settings are applied to all web pages that use the particular table fields.  These settings can be further customized at the page and control level on each web page.

Moreover, Iron Speed Designer applications include code that translates between the database storage format for a field, to the display and input formats, and then back again upon insertion to the database.  For example, a phone number may be stored as 6502152200, but displayed as (650) 215-2200.  Using Iron Speed Designer, you can avoid writing such code.

Basic schema information

Iron Speed Designer is not a data modeling tool; it cannot create or modify database tables (schema definitions) nor will it graphically depict relationships between the various tables.  However, it does show the database tables you have elected to use in your application as well as basic schema information for each table.

The following database table schema information is shown:

Option

Description

Index

Indicates whether the field is indexed in the database.

Primary key

Indicates whether the field can have only unique values.  If selected, only one row in the table can have any particular value.  This is useful for enforcing uniqueness of numbers, such as record numbers.

Not NULL

Indicates whether the field has a Not Null constraint asserted on it.  Such fields must always be assigned a value when a record is added or updated.

Computed in Database

Indicates whether the field is computed in the database.  If a field is computed, it cannot be changed by an application built with Iron Speed Designer.

Settable Table Properties

Option

Description

Include table in application

Indicates whether the supporting database access code should be generated for the table.  Database tables and views used by the application automatically have this option selected.  However, you may instruct Iron Speed Designer to include code for tables not directly used by the application’s web pages.  This is useful in circumstances where a non-web interface is being used, such as a web service or a Windows application.

Allow insert, update and delete on table / view

If selected, stored procedures created for inserting, updating, and deleting records are created if the database allows stored procedures creation and it is not read-only.  If not selected, then the application will throw an exception if it attempts to call the insert, update, or delete functions.

This option is selected by default for tables with a primary key.  This option is not selected by default for tables or views without a primary key.

Note: this option is not available if the database is read-only, or if the table or view does not have a primary key or virtual primary key.

Settable Field Properties

Field Display Options

Field Validation Types

Primary and Foreign Key Options

Adding Virtual Foreign Key Relationships

Data Conversion Options

Display Format Options

Storage Format Options

Permitted Value List

Adding Not-Null Field Constraints