Database Table Editor

Help Contents

Introduction

The Database Table Editor is a tool for editing Database Table Tags Database Table Tag icon:

Database table editor

Using this tool you can do any of the following to a Database Table Tag:

Opening the Database Table Editor

To open the Database Table Editor do one of the following:

Add a New Column

To add a new column:

  1. Click the Add New Column button.
  2. In the Properties Window, set the column properties.

Note: Changes will not be applied to the Database Table Tag until you click Save.

Edit an Existing Column

To edit an existing column:

  1. In the Database Table Editor, click on the column to select it.
  2. Change the column properties using the Properties Window.

Note: Changes will not be applied to the Database Table Tag until you click Save.

Delete an Existing Column

To delete an existing column:

  1. In the Database Table Editor, right click on the column.
  2. Select Delete.
  3. In the Delete Column dialog, click Yes.

Note: Changes will not be applied to the Database Table Tag until you click Save.

Column Properties

When you select a column in the Database Table Editor, these properties are shown in the Properties Window:

PropertyDescription
Column Name The name of the column.
Data Type The data type of the column.
Allow Null Whether the column allows NULL values.
Auto Generate Whether a value is automatically generated for the column. Allowed options include:
  • No - No value is automatically generated.
  • Default - A value is automatically generated if no value is declared in the INSERT statement.
  • Always - A value is always generated.
Default Value The default value of the column. You can use any SQL Value Expression to set a default value.
Remarks Comments and notes associated with the column.

To change a property:

  1. Select the property in the Properties Window.
  2. Enter a new value.
  3. Do one of the following:

Column Name Property

The Column Name Property must be a valid SQL Identifier.

If you want to include spaces and other special characters in a column name, use a delimited identifier. For example:

"Column Name !"

Data Type Property

The Data Type property defines the type of data stored in the column.

To change the Data Type of a column:

  1. Click on the Property browse button in the Data Type property. The Edit Data Type dialog opens:
    The Data Type Editor for Database Tables
  2. Select the required type from the Data Type drop-down list.
  3. If the selected type is VarChar, or WVarChar, enter the required Length.
  4. Click OK.

These Data Type values are supported:

Data TypeDescriptionIEC 61131-3
Equivalent
Boolean A single bit TRUE or FALSE. BOOL
TinyInt An 8 bit signed integer (-128 to +127). SINT
SmallInt A 16 bit signed integer (-32768 to +32767). INT
Integer A 32 bit signed integer (-2147483648 to +2147483647). DINT
BigInt A 64 bit signed integer (-9223372036854775808 to +9223372036854775807). LINT
Real A 32 bit floating point value. REAL
Double A 64 bit floating point value. LREAL
Interval An interval of time. TIME
Time Time of day (00:00:00.000 to 23:59:59.999). TIME_OF_DAY
Date A calendar date. DATE
Timestamp A calendar date and time of day. DATE_AND_TIME
VarChar(n) A variable length UTF-8 string with maximum n characters. STRING[n]
WVarChar(n) A variable length UTF-16 string with maximum n characters. WSTRING[n]

If you enter the data type directly, try to enter data types exactly as shown in the above table. If you enter a data type that is not valid, the Data Type Property will reject the new value.

Further Information

Fernhill SCADA Configuration Tool

To learn about the Fernhill SCADA Configuration Tool.

Tag Window

For information on the Tag Window.

Database Table Tag

For information about managing application specific database tables.

Glossary

For the meaning of terms used in Fernhill SCADA.