The structure definition is the name of a text file which is structured like this:
The section below [INDEX] is only necessary if the table is numerated automatically.
A field specification fieldspec has the following structure:
All identifiers are valid for a field identifier which start with a letter or a undeline and include only letters, figures and underlines. The maximum length is 35 chars.
The following type definitions are valid:
STRING,length (length from 1 to 255)
-> string field with the defined maximum length
-> numeric field depending on NumCode
NumCode type value facet
1 Byte whole numbers from 0 to 255
2 16-Bit-Integer whole numbers from - 32768 to + 32767
4* 32-Bit Integer whole numbers from - 2147483648 to + 2147483647
6** 6-Byte REAL floating-point number (old Borland format)
from -2.9 x 10^39 to +1.7 x 10^38 and 11-12 sign. digits
8*** 8-Byte-REAL floating point number (ANSI double)
from -5.0 x 10^324 to +1.7 x 10^308 and 15-16 sign. digits
*) only tdbengine, incompatible to VDP or TurboDatenbank
**) compatible to all VDP and TurboDatenbank versions
***) only tdbengine and VDP (since 2.5)
Decimal places are considered only at the REAL types. They are integral for the data transfer with the functions GetField and SetField as well as at the export to other database formats. Internal all REAL types are saved allways with the best accuracy.
Is the parameter U defined in selections tdbengine differs between the value 0 and "undefined".
Memos and Blobs:
-> makes a memo field
The content of a memo field is a link to a additional memo file. In memo files only unformated textes are saved.
-> makes a blob field
The content of a blob field is a link to an additional blob file. In blob files any data is saved. With blocksize you can define the size of the clusters in the blob file (Minimum = 64, Maximum = 8192, Default = 4096). Per entry to a blob file an half cluster is lost in avarage, but to small clusters extend the access time.
-> auto number field (AUTO INCREMENT)
The counting starts (in a new table) with a start number (resp. 1 if no one is specified)
Date and time:
-> Date field (dd.mm.yyyy)
-> Time field (hh:mm)
-> select field with the defined value facet
-> relations field between the specified tables
Attention: tdbengine does not create the belonging relations table. Therefor is the function GenRel.
-> ADL-Link field to the specified table
It is not checked if the table exists or if it is numerated automatically.
Define import fields:
If in GenTable a source is specified, the specified field is replaced by the content of the defined import field of the source.
If no import field is defined the specified field name is used.
If the same filename is specified as source and target, the table is restructered accordant. To use an abbreviation for the same file name you can use "@".
Note: The structure definition is rather a maschine file which is created by a utility programm by interaction with the user. If you want to create a structure definition manually you should attend to the following necesarilly:
* The numbering of the fields has to be complete.
* No field number may occur twice.
* Add new fields always at the end, because the order is not essential.
* If you want to change a field identifier in course of a restructuring, do not forget to define the previous identifier as a import field. Otherwise the content of the field is lost.
The restructuring of a table is always a critical event if the table already contains information. You can be conducive to more data security by not using direct restructuring. Instead of that rename the table with RenTable define the renamed table as source. If an error occurs you can still access to the previous table.