Applies To:
  • CitectSCADA 5.xx

Summary:
I am using Citect as an ODBC Server.

What are the SQL expressions to connect and read and write to the Variable Tags database?

 

Solution:
The Connect String is -

ODBC;DSN=Citect;DBQ=.;TABLE=TAGS

The SQL Read Expression for the whole table is -

SELECT TAGS.NAME, TAGS.VALUE
FROM TAGS

To read the value of only one Variable Tag, called MyTag1 -

SELECT TAGS.NAME, TAGS.VALUE
FROM TAGS
WHERE (TAGS.NAME = 'MyTag1')

To write the integer 14 to a Variable Tag called MyTag1 -

UPDATE TAGS
SET VALUE = '14'
WHERE (TAGS.NAME = 'MyTag1')

See also KB article Q2097.

 

Keywords:
 

Attachments