The Views Panel (Named IO)
Within a Sunbelt Named IO Schema database a required table named "sun_views" must exist. The SchemaEditor exposes this table using the Views panel. This table contains data that gives an identification number and name for record layout views. The view names specified in this table are not case sensitive. A PLB program can specify a view name in an OPEN or PREPARE instruction. The file variable is then associated with the view data layout to perform file IO operations. The following column names are defined in the 'sun_views' table and maintained by this utility:
|
Column |
Use |
|
id |
This column is a unique number that identifies a view record layout. This 'id' column value uniquely identifies column data found in the 'sun_columns' table. The id column is a pseudo column whose value is a unique number assigned by the SQLite database engine when a row is inserted into a table. The id column cannot be changed by an end-user. The SQL data type for this column is 'integer primary key'. |
|
name |
This column contains a name for a view record layout The view name can be specified in a OPEN or PREPARE instruction when a PLB program executes. This name is not case sensitive. The SQL data type for this column is 'text not null unique'. |
|
description |
This column contains text that describes the schema record layout view that has been specified. The SQL data type for this column is 'text'. |

View Addition
To add a view to the database, select "Add" from the View menu or right click on the Views panel and choose "Add". The View Editor will then be displayed.

Typically, enter a view name and click to the "Add Column" to invoke the column editor and define the columns required in the view.

You may add as many columns as needed. Once all columns have been defined, click the "Close" button to return to the view editor.
If you have PL/B source statements that define the columns, you may use another method to quickly define the view's columns. Clicking the "Import PLB" button presents a dialog as follows:

You can type PLB data definition statements (Dims, Forms, Integers, and Inits) into the edit window. Alternatively, you can paste copied source statements into the window. Finally, you can click the "Load" button and select a file containing source statements. Once the statements are in the source window, click "Import" to convert the data definitions to column definitions.
Another alternative for defining columns is to import the definitions from a schema file defined for use with Sunbelt ODBC product. By clicking "Import Schema" from the view editor, you may select the desired schema file and the following dialog is displayed:

After selecting the table as defined in the schema file, the columns will be added to view definition.
After columns have been defined, the View Editor allows columns to be edited and deleted before the view is actually created. Once the view name and at least one column have been defined, click "Create" to make the view.
Copy View
View may copied into a new view. When the copy function is selected from a menu, the View Copy dialog will appear.

A proposed new name consisting of the original view's name with the "_copy" suffix is added. Columns may be excluded or included from the process.
Edit View
The Edit View function allows the user to alter a view's name or description. Once selected, the following dialog appears:

Delete View
The Delete view function removes the view and all associated columns from the schema database. The Delete functions within the SchemaEditor utility all support multiple selection.
![]() |