<< 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 |
|
ArchivedValue |
|
CompressedDataNValues |
|
CompressedDataStartEndTime |
|
SampledData |
|
CalculatedData |
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.