User Tools

Site Tools


softvelocity_datadictionary_editor_tableeditor.htm
Navigation:  Dictionary Editor >====== New/Edit Table Properties Dialog ====== Previous pageReturn to chapter overviewNext page

This dialog allows you to add a new data table to the list and choose its database driver.

Once the table appears on the list, you may declare columns, keys, set relationships, and other properties for the data table. Using the data from this dialog, the Application Generator will write the FILE structure declaration.

To modify the table properties at a later time, highlight the table name on the Dictionary dialog list, then either DOUBLE-CLICK or press the Properties button.

TableTabs_shg.jpgadm1 optionsadm1 commentsadm1 general

Click on a TAB to see its help

General

Label

Type a data table name, as you wish to refer to it in your code. This serves as the label for the Clarion FILE structure. Specify a valid Clarion label–Clarion will automatically truncate the name if necessary. You may also specify a completely different name for the DOS file–see Full Pathname, below. See Also: Declaration and Statement Labels.

Description

Enter a string description for the table. Clarion automatically displays the descriptions in certain dialogs, allowing you to quickly recognize the table contents.

Prefix

As you enter the data table Name, Clarion automatically extracts the first three letters to use as a label prefix when referring to the table. Optionally specify up to 14 characters of your choice in this field. This supplies the parameter for the PRE attribute.

The prefix allows your application to distinguish between similar variable names occurring in different data structures. A column called Invoice may exist in one data table called Orders and another called Sales. By establishing a unique prefix for Orders (ORD) and Sales (SAL), the application may refer to columns as ORD:INVOICE and SAL:INVOICE.

Driver

Specify the database type. This supplies the first parameter for the DRIVER attribute. When using the Application Generator, Clarion automatically links in the correct database driver library. See Database Drivers for a discussion of the relative advantages of each driver. You can specify the default driver by choosing Setup C6H0013.jpg Dictionary Options.

Remember that individual database drivers may vary in their support of some of the attributes which you add to the FILE structure in this dialog box.

Driver Options

Optionally type a string for the second parameter of the DRIVER attribute. This conveys additional instructions to the database driver and corresponds to the second parameter for the DRIVER attribute, also known as a “driver string.” Database Drivers contains additional information. This supplies the second parameter for the DRIVER attribute.

Owner Name

Optionally type a string containing the password for access to the table. This is dependent on the database system. This adds the OWNER attribute to the FILE statement.

You may also check the Encrypt box (below) which adds the ENCRYPT attribute. Encrypting the table means that only your application will be able to read the table. It does not mean that it automatically prompts the end user for a password. The end user, however, may not access the data with any other table viewer.

When using the ODBC driver, type the data source name, user ID, and password, separated by commas, in this field.

Full Path Name

Type either the path, or a fully qualified file name for the data table. If you leave this entry blank, Clarion automatically uses the first eight letters of the name entered in the Label field. You may also omit the table extension–Clarion will supply the correct extension depending on the database driver chosen. This entry supplies the parameter for the NAME attribute.

See Also: PROP:DataPath

When using the TopSpeed driver, if you wish to store multiple tables in a single physical file, separate the file and table names with “\!,” as in INVOICE\!ORDERS. This refers to the ORDERS table in the INVOICE.TPS file.

See Also: TopSpeed Database Driver

When using an ODBC driver to define a FILE such as Microsoft Access, which can store multiple tables in a single file, place the table name in this field. Typically, the name of the physical file which includes the table is listed in the ODBC.INI file; the ODBC driver manager provides this information to the driver.

TipBox.jpg

To specify a variable name for the actual file name, place it in this field, and prefix the variable name with an exclamation point (!).

Create

Optionally specify that the application should create the data table if it does not exist at runtime. This adds the CREATE attribute to the FILE statement.

Reclaim

This option is dependent upon the database driver. It specifies that the application reuse file space formerly taken up by deleted records. Otherwise, the application adds new records to the end of the table. This adds the RECLAIM attribute to the FILE statement.

Encrypt

Optionally turn on table encryption. You must also specify an Owner Name (see above). This adds the ENCRYPT attribute to the FILE statement.

Threaded

Optionally specify that each execution thread in your application that uses this table allocates memory for its own separate record buffer. This is typically for use in multiple document applications, and improves table handling. The Clarion default templates automatically add the THREAD attribute on each FILE structure.

OEM

Specifies string data is converted from OEM ASCII to ANSI when read from disk and ANSI to OEM ASCII before writing to disk. This adds the OEM attribute to the table definition.

Bindable

Optionally specify that all variables in the RECORD structure are available for use in dynamic expressions at runtime. The compiler will allocate memory to hold the full Prefix:Name for each variable, instead of using its own internal reference for each variable. Therefore the BINDABLE attribute increases the amount of memory necessary for the application.

See Also:

How to Design Your Dictionary and Database

How to Create a Data Dictionary

Comments

Allows you to enter a text description describing the table. The description is solely for your convenience, and has no effect on the application. It is useful for situations in which other programmers may pick up your code later, or for when you expect to return to the project after a long period of time since you last looked at it.

This tab also includes read-only information about the selected dictionary element. It includes the date that it was created and last modified, version number, and user rights to the target element.

Options

Do Not Auto-Populate This Table

Directs the wizards to skip this table when creating primary Browse procedures or Report procedures.

User Options

The IDE supports 3rd party pre-defined DCT options. These options are stored in .dctopt files.

The dctopt file is an XML file with a schema of dctopt.xsd.

Any dctopt file in <;clarion>/data/DictionaryOptions or <;userdata>\SoftVelocity\Clarion\7.0\DictionaryOptions directories will be read by the IDE.

The default for SoftVelocity is <;Clarion Root>\data\DictionaryOptions\SoftVelocity.dctopt.

The IDE will also automatically detect changes in these files and update the list of available options

The text typed into this field is available to any Utility Templates that process this table in the %FileUserOptions symbol. The individual Utility Templates determine the proper syntax for these user options. See also %FileUserOptions in the Template Language Reference.

To add a new entry, press the Insert button in the Options toolbar. In the subsequent dialog, you have four choices: Bool, String, Integer or Predefined. Bool is for Boolean type expressions, such as On or Off, True or False, etc.

If you choose String, the value has an ellipsis button to open a text window. This allows you to enter a string value. The maximum length for any option is 4096 characters.

If you select Integer, the user-defined option will be a numeric value.

Choose Predefined to get a property that is already defined. This is used to set pre-defined properties for use later. A drop list is provided allow you to choose from the list. Selecting a property from this list not only adds the property but also activates it for use

Follow the instructions provided with your add-on template set.

See Also:     Using Wizard Options

softvelocity_datadictionary_editor_tableeditor.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1