Quantcast

Citect - Library Control - SQL Table

FA356385

01 March 2021

Applies To: Citect SCADA 2016 & Citect SCADA 2018 
Summary:   I’m using the Library Control SQL Table object and expect to get the value of the cell using the Cicode function LibTable_GetCellValue on a left click. This functionality works when clicking on the column title but not when clicking on a cell.

FUNCTION TestLeft(STRING sName, STRING sRef, STRING sRow, STRING sCol)
STRING sCellVal;
 
sCellVal=LibTable_GetCellValue(sName,StrToInt(sRow),StrToInt(sCol));
END

Solution:  LibTable_GetCellValue is a wrapper function for _LibTable_GetCellValue with bCacheOnly set to TRUE.

Cell data is not supported in Cached mode, therefor you must call the wrapper function directly with bCacheOnly set to false as follows.

sCellVal = _LibTable_GetCellData("_tbl_"+sName, "", StrToInt(sRow), StrToInt(sCol), -1, -1, "", FALSE); 

Keywords:  SQL, Alarm, table, Cicode, mouse click