Table elements

Tables store data generated and used by your application. When you create tables in Dexterity, you’ll use or define several elements required for tables to store and access information properly, such as fields, keys and table relationships. Before you create tables, be sure you’ve defined all the fields that you’ll be using to store information in the table.

If you’re creating applications that integrate with Microsoft Dynamics GP, be aware that Microsoft Dynamics GP table structures can’t be modified. Additional information must be stored separately in tables you add.


Each table has a table name, display name, physical name, series, database type, table fields, keys, key options, segment options and table options. Use the Table Definition window to create tables.

Names

Three names are required for each table. The table name is the name that is used in scripts to refer to the table. To make the name easier to use in scripts, you can use underscores (_) between parts of the name instead of spaces.

The display name is the name that appears when the name of the table is displayed on the screen in an application. This name is usually the same as the table name, but typically has spaces between parts of the name, rather than underscores.

The physical name is the name under which the table is stored by the operating system or database. By default, this name can be up to eight characters long and must conform to the operating system standards for the system running Dexterity. The appropriate extension, if required, is added automatically.

The following names are for a table containing customer information:

[spacer]

Table Name

Customer_Data

Display Name

Customer Data

Physical Name

CUSTDATA


If you’re developing an application for an operating system that supports long file names, you can mark the Allow Long Physical Names option in the Options window. (Choose Options from the Edit menu to open the Options window.) Marking this option allows you to enter table physical names up to 24 characters long.

Table series

When you create a table, you must specify the series the table is part of. The table series allows you to group related tables in a Dexterity application together using series categories like Sales, Financial and System. For example, you could assign all of the tables used in a Sales Order Processing application to the Sales series. You will use these series groupings when you use the Report Writer, set up pathnames, and perform table maintenance routines.

Database type

The following database types are supported by Dexterity: c-tree Plus, Pervasive.SQL, and Microsoft SQL Server. Use the following guidelines when selecting a database type:

c-tree   Choose c-tree to use the c-tree Plus database type.

If you use the c-tree Plus database type, each table will have two files created. One will have the physical name you specified plus the extension .DAT (data file), while the other will have the physical name plus the extension .IDX (index file).

Pervasive.SQL   Choose Pervasive.SQL to use the Pervasive.SQL database type. This database type was formerly known as Btrieve.

If you use the Pervasive.SQL database type, each table will be created with the physical name you specified, plus the extension .BTR. You can use the BtrieveFileNameExtension defaults file setting to specify a different extension.

SQL   Choose SQL to use the SQL database type. If you use the SQL database type, each table will be created with the physical name you specified.

Memory   Choose Memory to have the table created and stored in memory. Memory-based tables act just like c-tree tables, with the exception that they are stored in memory, rather than written to a physical disk. For more information about using memory-based tables, refer to Memory-based tables.

Default   Choose Default to allow the database type to be determined at runtime. At runtime, Dexterity or the runtime engine will ascertain which database type to use based upon several system settings. The DatabaseType defaults file setting or the Table_SetDBType() function can be used on any platform to set the default database type.

A command line option can also be used to specify the default database type. The following table lists the command line options and the default database they specify.

[spacer]

Command line option

Default database type

/Ctree

c-tree Plus

/Btrieve

Pervasive.SQL (Btrieve)

/SQL

SQL


The command line option overrides the DatabaseType defaults file setting. The Table_SetDBType() function overrides both the command line option and the defaults file setting.


Documentation Feedback