WinCC - Connectivity Pack - Query For User Archives

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

WinCC/Connectivity Pack

Query for User Archives

Query for User Archives

Introduction
With the following query, you may use MS OLE DB Provider to access WinCC user archives. Access
may be read or write enabled in order to analyze the saved data and to modify and save same.
The data can be selected using filter criteria. The queries are forwarded to the database by the command
object.

Note
Consider the following when accessing WinCC user archives via the MS OLE DB Provider:
• Ensure that the write access is not enabled simultaneously via the MS OLE DB Provider and WinCC. This
prevents inconsistencies in the archives.

• Changes via MS OLE DB Provider will not be displayed in WinCC Runtime until the user archive table controls
are selected by a picture change. The current data of the user archives are read again.

• User archives changed via MS OLE DB Provider are not synchronized in a redundant system.

• Note that WinCC updates can cause changes in the database scheme. The scheme can also be changed by the
installation of hot fixes and service packs. In this case, you must adapt the read and write access accordingly.

Syntax
Reading of Values
SELECT * FROM UA#<ArchiveName>[WHERE <Condition>...., optional]
Writing of Values
UPDATE UA#<ArchiveName> SET UA#<ArchiveName>.<Column_n> = <Value>
[WHERE <Condition>...., optional]
Inserting a Data Set
INSERT INTO UA#<ArchiveName> (ID,<Column_1>,<Column_2>,<Column_n>)
VALUES (<ID_Value>, Value_1,Value_2,Value_n)
Deleting a Data Set
DELETE FROM UA#<ArchiveName> WHERE ID = <ID_Number>

Parameter

Parameter Description

ArchiveName Name of the user archive.

Ce document est constitué d'extraits gratuits de documentation sélectionnés par l'utilisateur au départ de la documentation mise à disposition par Siemens pour ce produit. Toute
responsabilité quant à l'intégralité du contenu de ce document est exclue. Ce document ne doit servir que les besoins propres et internes de l'utilisateur. La transmission à des tiers
est interdite.
6/24/2022

Antenna House XSL Formatter (Evaluation) http://www.antennahouse.com/


WinCC/Connectivity Pack
Query for User Archives

Parameter Description

Condition Filter criterion e.g.:


LastAccess>'2004-06-01' AND LastAccess<'2004-07-01'
DateTime>'2004-06-01 17:30:00'
ID = 5
ID > 3

Example 1:
Reads all data in the user archive "Test".
SELECT * FROM UA#Test

Example 2:
Reads all data in the user archive "Test" that were changed between June 1, 2004 and July 1, 2004.
SELECT * FROM UA#Test WHERE LastAccess>'2004-06-01' AND
LastAccess<'2004-07-01'

Example 3:
Enters the value 'New_String' in the field F_STRING of the ID 3.
UPDATE UA#TEST SET F_STRING = 'New_String' WHERE ID = 3

Example 4:
Inserts a data set with the ID 100.
INSERT INTO UA#Test (ID,F_Integer,F_Float,F_Double,F_String) VALUES
(100.10,'10.0','AAAA')

Example 5:
Deletes the data set with the ID 100.
DELETE FROM UA#Test WHERE ID = 100

See also
→ Displaying User Archives

Ce document est constitué d'extraits gratuits de documentation sélectionnés par l'utilisateur au départ de la documentation mise à disposition par Siemens pour ce produit. Toute
responsabilité quant à l'intégralité du contenu de ce document est exclue. Ce document ne doit servir que les besoins propres et internes de l'utilisateur. La transmission à des tiers
est interdite.
6/24/2022

Antenna House XSL Formatter (Evaluation) http://www.antennahouse.com/

You might also like