Update cookies preferences
Promotic

BackupInfo - method of the PmaTrendGroup object

Description:
Returns information about saved trend data on the disk.
Syntax:
Variant BackupInfo(String sType, Long nParType, Variant vPar)
Parameters:
sType(String) Type of the required information that has to be returned by the method.
"bckcount" - The method returns the number of still created backup files.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method always returns the 1 value.
The nParType parameter is set 0.
"bckcountmax" - The method returns the maximum number of backup files.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method always returns the 1 value.
The return value corresponds to setting the "Maximum number of backups" configurator in Database Access backups (obsolete) or in Database MS SQL Server backups (obsolete).
The nParType parameter is set 0.
"name" - The method returns the system name of one backup specified by the parameters nParType, vPar.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method returns the name of the table or data file.
The nParType parameter is set to one of the options 10,20,21,30.
"title" - The method returns the user name of one backup specified by the parameters nParType,vPar.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method returns the name of the table or data file.
The nParType parameter is set to one of the options 10,20,21,30.
Note: The user name can be entered in the script in each backup by setting the NewTitle parameter in the onBackupCreate event.
"reccount" - The method returns the number of still saved records in the backup specified by the parameters nParType,vPar.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method returns always the number of all saved records.
The nParType parameter is set to one of the options 10,20,21,30.
"timeoldest" - If the concrete backup is specified in parameters nParType,vPar (one of the options 10,20,21,30 is set), then the method returns the time of the oldest record of the backup.
If the concrete backup isn't specified in parameters nParType,vPar (the option 0 is set), then the method returns the time of the oldest record of all backups.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method returns the time of the oldest record.
The parameter can be set even in the form timeoldest:winter, then the method returns always "standard time" (in the daylight-saving and standard season), otherwise the method returns "local time" (corresponds to the computer time depending on the locale setting of Windows system).
"timenewest" - If the concrete backup is specified in parameters nParType,vPar (one of the options 10,20,21,30 is set), then the method returns the time of the newest record of the backup.
If the concrete backup isn't specified in parameters nParType,vPar (the option 0 is set), then the method returns the time of the newest record of all backups.
If the "Storage type" configurator is set to the option not supporting the backup (see Note), then the method returns the time of the newest record.
The parameter can be set even in the form timenewest:winter, then the method returns always "standard time" (in the daylight-saving and standard season), otherwise the method returns "local time" (corresponds to the computer time depending on the locale setting of Windows system).
nParType(Long) Specifies the type of the value expected in the vPar parameter.
0 - The method works with all data of all backups. The vPar parameter is set to 0.
10 - The method works with the backup specified by index.
The 0 value set in the vPar parameter means the current backup (the backup where the current records are written). The higher index, the older backup.
The -2 value set in the vPar parameter means the oldest backup.
20 - The method works with the backup specified by the time set in the vPar parameter, i.e. the backup is searched so that the time entered in the vPar parameter is inside the time-range between the time of the oldest and the newest record of the backup.
The time entered in the vPar parameter is expected as the "local time" (corresponds to the computer time depending on the locale setting of Windows system).
21 - The same as the previous option, only the time entered in the vPar parameter is expected as the standard time (even in the daylight-saving season).
30 - The method works with the backup specified by the name (e.g. the name of the database table).
vPar(Variant) Value of the parameter depends on the nParType parameter
Note:
The behavior of the method is affected by setting the "Storage type" configurator.
Storage type can be set to:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var tTime, sTitle;
var oTrend = pMe.Pm("/Trends");
tTime = oTrend.BackupInfo("timeoldest", 0, 0);   // Time of the oldest saved record from all backups
tTime = oTrend.BackupInfo("timenewest", 0, 0);   // Time of the newest saved record from all backups
tTime = oTrend.BackupInfo("timeoldest", 10, 0);   // Time of the oldest saved record from the current backup
tTime = oTrend.BackupInfo("timenewest", 10, 0);   // Time of the newest saved record from the current backup
tTime = oTrend.BackupInfo("timeoldest", 10, -2);   // Time of the oldest saved record from the oldest backup
tTime = oTrend.BackupInfo("timenewest", 10, -2);   // Time of the newest saved record from the oldest backup
sTitle = oTrend.BackupInfo("title", 20, Pm.Time - 1 / 24);   // User name of the backup that is specified by the time
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.