Promotic
WikipediaLinkedInYoutubeTwitterFacebook

dBase backup data saving (Database dBase backups)

Description:
This window is used for setting the parameters of data storage into the dBase database. This technology is used to store the data into tables (dBase files *.dbf), the name beginning with a prefix defined in the Backup name prefix configurator. The single table size is defined together with total maximum table number. If one table (backup) is filled up (the table data volume exceeds defined value), a new table is created, that is used for storing the data since this time. This walkthrough repeats all over again.

Note:The size of one backup (*.dbf file) can be set to unlimited and new backups are then created by calling the BackupCreate script method.

Caution:Two different PmTrend objects should not be set to save the data into the same folder on the disc. If so, the first characters of the backup filenames would have to be different making the number of saving files very high and significantly increasing the processing power needed to manage the backup saving.

The variable name in Data page can be maximum 11 characters long (the length of column name in the dBase table is limited).

Configuration items:
Data source (ConnectionString)A string used for connection to the data source by using the PROMOTIC technology (not ADO). The same syntax is used in order to keep it simple.

Macro expression can be used for input (it is evaluated while the application is launching).

For example$.join("Data Source=",$.path("data","trend/"),$.expr("pMe.GroupId"),"/;")
Data Source - The disc folder to be used for dBase data files (*.dbf) creation and storage. If there are multiple PmTrend objects present in the application, then each must save the data into separate folder on the disc, or the starting characters of the backup filenames must differ. This configurator must not contain an empty string.
Additional parameters Additional parameters for saving. Allow to define names and data types of system columns, database types based on the trended value data type. Available parameters are shown in the following example together with their preset values for selectaed saving type (plugin). These values may not be entered. Enter the values only if non-default are needed. Entries with assigned value are separated by a semicolon, for example "coltimename:pm_time;colattrname:pm_attr;dbdt.f64:NUMERIC(12,4);dbdt.f32:NUMERIC(8,2);dbdt.i32:NUMERIC(10,0);dbdt.i16:NUMERIC(5,0);dbdt.u8:NUMERIC(3,0);dbdt.b:NUMERIC(3,0);".

Macro expression can be used for input (it is evaluated while the application is launching).

coltimename (optional) - Name of column containing the record timestamp.(default) "coltimename:pm_time;".
colattrname (optional) - Name of column containing the record attribute.(default) "colattrname:pm_attr;".
dbdt.f64 (optional) - Database data type of the column for trended value of the Float64 (Double) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.f64:NUMERIC(12,4);".
dbdt.f32 (optional) - Database data type of the column for trended value of the Float32 (Single) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.f32:NUMERIC(8,2);".
dbdt.i32 (optional) - Database data type of the column for trended value of the Int32 (Long) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.i32:NUMERIC(10,0);".
dbdt.i16 (optional) - Database data type of the column for trended value of the Int16 (Integer) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.i16:NUMERIC(5,0);".
dbdt.u8 (optional) - Database data type of the column for trended value of the Uint8 (Byte) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.u8:NUMERIC(3,0);".
dbdt.b (optional) - Database data type of the column for trended value of the Bool (Boolean) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.b:NUMERIC(3,0);".
Backup name prefixFirst part of the backup (dBase file) filename. The whole filename consists of this prefix followed by time string, displaying the time of backup creation, for example trend2007-01-15_18-45-43.dbf.

The backup names creation can be modified using the onBackupCreate event i.e. using self defined backup names.

Macro expression can be used for input (it is evaluated while the application is launching).

Note!If the trend is in the mode "Read only (new records can't be written)" (see the configurator "Read only (new records can't be written)"), then there can be a reference to a single specific *.dbf file by entering the whole path and filename (e.g. by using the #data:). The "Data source (ConnectionString)" configurator is not filed in this case.

This configurator must not contain an empty string.
Backup size by records countThe size of one backup (table) is defined by the record count. If the backup size defined here is exceeded when writing new record, then new empty backup (*.dbf file) is created and the new record is saved here. Following records are saved into this new backup since this moment. The value -1 means, that the backup size is not limited by record count.
Backup size by time intervalThe backup (table) size is defined by time interval. If the backup time span defined here is exceeded when writing new record, then new empty backup (*.dbf file) is created and the new record is saved here. Following records are saved into this new backup since this moment. The value unlimited means, that the backup size is not limited by time span.
Backups countBy continual writing, new tables (backups) are created. Their maximum count is defined by this configurator. If there is defined, for example, the maximum count of backups to 10 and 11th backup is created, the backup with the oldest data is removed and the backups count is still only 10. The value -1 means that the backups count is not limited.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice