Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA Historian Client | Web
  • AVEVA Historian Client | Web Tech Notes

TN HistClient124 How to run a sql query in the Historian Client ActiveData Grid using a script

Last updated: March 4th, 2025

Description

  • Author: Benjamin Davis
  • Published: March 4th, 2025

Details:

Description

Method to run a sql query in the Historian Client ActiveDataGrid using a script

  • Author: Benjamin Davis
  • Published: 12/28/2015
  • Applies to: InTouch 2014R2

Details

Add the Historian Client ActiveDataGrid to an InTouch window

How to add the Historian Client ActiveDataGrid to an InTouch window

Name the ActiveDataGrid

  1. Double click the ActiveDataGrid
  2. Type in the name in the ControlName field, e.g., aaHistClientActiveDataGrid1

Set the query using the .SQLString dot field

#aaHistClientActiveDataGrid1.SQLString = "

USE RUNTIME

SELECT Datetime, Tagname, Value, QualityDetail 
FROM Live 
WHERE Tagname = 'SysTimeSec'" ;

Run the query using the .Execute dot field

#aaHistClientActiveDataGrid1.Execute();

***You can also use concatenation and use Message tags to fill the query***

#aaHistClientActiveDataGrid1.SQLString = "USE RUNTIME
SELECT Datetime, Tagname, Value, QualityDetail
FROM " + StringTag2 + "
WHERE Tagname = '" + StringTag1 + "'" ;

execute script historian activedata
Give feedback about this article

Recommended articles

Historian Client control in InTouch slow to load

Read More

TN 1116 How to determine time between samples

Read More

TN 1267 Historian Client Query Server Configuration Failure

Read More

TN - 1230 Resolving Incorrect server.xml file used after coping server.xml to user profiles

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand