Promotic

LocalPutData - method of the AtouchX object

Description:
Writes the value of the database variable to the local database (without communication).
The method writes the content of a database variable or a part of a database matrix. The writing is done without communication to the local database on the computer.
 
The written content must match the database variable being written. If written to a simple database variable then it must be a DATA simple value. If written to the matrix (and part of it) then it must be DATA a 2-dimensional array, whose number of rows and columns corresponds to the number of rows and columns being written. in this case, the initial indices of DATA do not matter, but only the dimensions. On writing just one element of the database matrix, DATA can be a simple value or a 2-dimensional array of one row and one column. The
 
DATA must be of such a type that its values can be written to a database variable without loss of information.
Syntax:
Integer LocalPutData(Long WID, Integer Row, Integer Col, Integer Rows, Integer Cols, Variant DATA)
Parameters:
WID(Long) WID of the database variable for reading.
Row(Integer)
If the written database variable is of simple type, then the parameter has no meaning.
If the written database variable is a matrix then the parameter defines the index of the initial row of the matrix (zero-based index) where it is written.
Col(Integer)
If the written database variable is of simple type, then the parameter has no meaning.
If the written database variable is a matrix then the parameter defines the index of the initial column of the matrix (zero-based index) where it is written.
Rows(Integer)
If the written database variable is of simple type, then the parameter has no meaning.
If the written database variable is a matrix then the parameter defines the number of rows of the matrix to be written.
Cols(Integer)
If the written database variable is of simple type, then the parameter has no meaning.
If the written database variable is a matrix then the parameter defines the number of columns of the matrix to be written.
DATA(Variant) Variable where the read data is stored.
Return value:
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nWID = 2005;
var DATA = 144;
var nState = oATC.LocalPutData(nWID, DATA);
Example2:
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nWID = 2005;
var DATA = "Data array";
var nState;
DATA = DATA.SaveToVbArray();
nState = oATC.LocalPutData(nWID, 3, 0, 10, 8, DATA);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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