sSourceType | (String) Specifies the type of the archive whose data will be accessed by calling the method.
"mssqlbackup" (optional) - Open the archive by the technology Database MS SQL server backups (obsolete). |
---|---|
sSource | (String) Specifies the data source to which the PmaTrendGroup object is connected. Entries are in the KeyVal format, for example "database:c:\database.mdb;table:data;".
"server:xxx;" (optional) - (is ignored if the sConnection parameter is defined) The name of the SQL server from which the data will be read. Not specified if the sSourceType parameter is set to "accesscyclic", "accessbackup", "dbasebackup" or "promoticcyclic".
"user:xxx;" (optional) - (is ignored if the sConnection parameter is defined) The user for the access to the SQL server. Not specified if the sSourceType parameter is set to "accesscyclic", "accessbackup", "dbasebackup" or "promoticcyclic".
"password:xxx;" (optional) - (is ignored if the sConnection parameter is defined) The user password for the access to the SQL server. Not specified if the sSourceType parameter is set to "accesscyclic", "accessbackup", "dbasebackup" or "promoticcyclic".
"database:xxx;" (optional) - (is ignored if the sConnection parameter is defined) The database for data storage is defined here. If the sSourceType parameter is:
"mssqlcyclic", "oraclecyclic", "mysqlcyclic", "firebirdcyclic", "mssqlbackup": specifies the SQL database.
"dbasebackup": specifies the *.dbf files folder.
"accesscyclic", "accessbackup": specifies the *.mdb file.
"promoticcyclic": specifies the *.ht file folder. "table:xxx;" (optional) - Specifies the table or table prefix where the data is stored. If the sSourceType parameter is:
"mssqlcyclic", "oraclecyclic", "mysqlcyclic", "firebirdcyclic", "accesscyclic": specifies the table name with cyclic data.
"dbasebackup": specifies the prefix (first part) of the backup names (tables in the database), the complete name consists of this prefix followed by the date with time. If the complete *.dbf file name is defined here (including the suffix) then only a single file is viewed (not a set of backups). Note! It is possible to enter a complete *.dbf file name including the path (folder). Then the path is not entered in the "database:" parameter. The complete path can be entered also in the form #data:.
"mssqlbackup", "accessbackup": specifies the prefix (first part) of the backup names (tables in the database), the complete name consists of this prefix followed by the date with time or serial number.
"promoticcyclic": specifies the *.ht cyclic file name (can be entered with the extension). Note! Is is also possible to enter the comlete *.ht file name including the path (folder). Then the path is not entered in the "database:" parameter. The complete path can be entered also in the form #data:. "coltimename:xxx;" (optional) - The name of the table column is entered here (specified by the table parameter), where the time is stored. The parameter can not be entered on setting the sSourceType to "mssqlbackup", "accessbackup", "dbasebackup" or "promoticcyclic".
"colattrname:xxx;" (optional) - The name of the table column is entered here (specified by the table parameter), where attributes are stored. It is filled up only if the database table is accessed that was created by archiving the data by the PmaTrendGroup object, otherwise this parameter is set empty. The parameter cannot be set on setting the sSourceType to "mssqlbackup", "accessbackup", "dbasebackup" or "promoticcyclic".
Caution! If the database table is being opened, that is not created by the PmaTrendGroup object and contain no atribute column, then the parameter must be empty value (colattrname:;), otherwise the default value "pm_attr" would be used. "backupcount:xxx;" (optional) - Specifies the backup (tables) number in the trend archive. It is used only if the sSourceType parameter is set to "mssqlbackup", "accessbackup" or "dbasebackup".
"backupsizerows:xxx;" (optional) - Specifies the size - number of rows - of one backup (table) in the trend archive. It is used only if the sSourceType parameter is set to "mssqlbackup", "accessbackup" or "dbasebackup".
"backupsizetime:xxx;" (optional) - Specifies the time span of one backup (table) in the trend archive. It is used only if the sSourceType parameter is set to "mssqlbackup", "accessbackup" or "dbasebackup". |
sConnection | [optional] (String) ADO Connection trend database connection string. If this parameter is set, then the following parameters of the sSource parameter are not used: "server:xxx;", "database:xxx;", "user:xxx;" and "password:xxx;". These parameters are already contained in the ADO Connection string in the sConnection parameter. |
oTrend.Open("accesscyclic", "database:c:\\trend1.mdb;table:history1;coltimename:pm_time;colattrname:pm_attr;");
// or
oTrend.Open("accesscyclic", "table:history1;coltimename:pm_time;colattrname:pm_attr;", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/trend1.mdb;");
oTrend.Open("accesscyclic", "database:c:\\data.mdb;table:pmctv;coltimename:savetime;colattrname:;");
// or
oTrend.Open("accesscyclic", "table:pmctv;coltimename:savetime;colattrname:;", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\data.mdb;");
oTrend.Open("mssqlcyclic", "server:.\\MSSQLSERVER;user:pm_writer;password:pmwriter;database:pm_data;table:pmctv;coltimename:savetime;colattrname:;");
// or
oTrend.Open("mssqlcyclic", "table:pmctv;coltimename:savetime;colattrname:;", "Provider=SQLOLEDB;Server=.\\MSSQLSERVER;Database=pm_data;Uid=pm_writer;Pwd=pmwriter;");
oTrend.Open("promoticcyclic", "table:c:\\data.ht;");
oTrend.Open("dbasebackup", "database:#data:/trend/archive;table:trend;backupcount:15;backupsizerows:500;backupsizetime:not limited;");
// or
oTrend.Open("dbasebackup", "table:trend;backupcount:15;backupsizerows:500;backupsizetime:not limited;", "Data Source=c:/trend/archive;");
var sSource;
oTrend.Close();
sSource = "table:#data:/trend/archive/trend2018-02-12_14-18-26;";
// or
sSource = "database:#data:/trend/archive;table:trend2018-02-12_14-18-26;";
oTrend.Open("dbasebackup", sSource);