Click or drag to resize
IDataConnection.ExecuteScalar Method
Executes the query and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 10.0.0
Syntax
C#
Object ExecuteScalar(
	string queryText,
	QueryDataParameters queryParams,
	QueryTypeEnum queryType,
	bool requiresTransaction
)

Parameters

queryText
Type: System.String
Query or stored procedure to be run.
queryParams
Type: CMS.DataEngine.QueryDataParameters
Query parameters.
queryType
Type: CMS.DataEngine.QueryTypeEnum
Indicates if query is a SQL query or a stored procedure.
requiresTransaction
Type: System.Boolean
If true, the query should run within transaction.

Return Value

Type: Object
See Also