ExecuteScalar

Metreos.Native.Database.ExecuteScalar

Summary

ExecuteScalar retrieves the first row and first column data field of the specified query.

Usage

ExecuteScalar requires that a named database connection already be open, which can done either by using OpenDatabase or by using the name of a database resource associated with the Cisco Unified Application Designer application.

Remarks

The ExecuteScalar will fail if at least one row is not returned. If it is at all possible that 0 rows are returned by the specified Query, then ExecuteQuery should be used instead and the results parsed appropriately.

Action Parameters
Parameter Name.NET TypeDefaultDescription
Query *System.StringA SQL SELECT statement designed to return at least one row and one column.
Name *System.StringThe name of the database connection to query.
Result Data
Parameter Name.NET TypeDescription
ScalarSystem.ObjectThe first row and column field.

Branch Conditions 

Success

No description.

Failure

No description.