External Query Tools

<< Click to Display Table of Contents >>

 

External Query Tools

When users are developing an external application using programming languages such as Java, Visual Basic, or C++, and they want to retrieve data stored by a Storage, then they can perform calls to Stored Procedures, which are created by a Storage on a database. The Stored Procedures that correspond to Query options are described on the next table.

Available options for queries

Query Function

Stored Procedure

LastValue

E3LastValueEx

ArchivedValue

E3ArchiveEx, E3ArchiveInterpolate

CompressedDataNValues

E3NCompDataEx

CompressedDataStartEndTime

E3CompDataEx

SampledData

E3SampledData

CalculatedData

E3CalculatedData

 

Stored Procedures that use Date-type parameters receive them as a Float (floating point) number, instead of a DateTime. This allows increasing E3 precision, because using a DateTime format allows a maximum precision of 3 ms, while a Float type allows 1 ms precision.

To easily pass parameters, users can add a user function to a database that converts DateTime values into Float values, according to the next example.

CREATE FUNCTION E3GETFLOATVALUE(@dDate datetime)
RETURNS FLOAT AS
BEGIN
  RETURN CAST(@dDate AS float)
END

 

The next topics contain information about the Stored Procedures created by a Storage.

 

NOTE

The Stored Procedure E3RawData, which returns data without aggregations, is not available as an option in the Functions item on the Fields tab of the Query associated to a Storage.

Was this page useful?