Directly add a new entry to the SQL database.
Syntax
METHOD PUBLIC AddValueDirect : BOOL
VAR_INPUT
var_name : STRING;
var_value: STRING;
var_type : DATACOLLECTOR_TYPE;
var_comment : STRING;
END_VAR
Parameters
|
Parameter |
Beschreibung |
|---|---|
|
var_name |
The name for the new entry as STRING.
|
|
var_value |
A value for the new entry as STRING.
|
|
var_type |
Specifies the variable type as DATACOLLECTOR_TYPE.
|
|
var_comment |
A comment for the new entry as STRING. |
|
Rückgabewert |
TRUE: Entry Successfully added
|
Example
data : MnDataCollector := (m_sDatabase := '\mnplc\boot\testdata.db', m_DatabaseLimit := DATACOLLECTOR_DATALIMIT_ENTRIES, m_dwDatabaseSize := 5);
----
data.open();
data.AddValue(var_name:= 'Testeintrag', var_value:= INT_TO_STRING(i), var_type:= 0, var_comment:= 'Testkommentar');
Requirements
Remarks