ExecuteScalar() Method

Syntax:

public object ExecuteScalar()

Description:

Executes the CommandText, returning the result first column of the first row of the results.

Return Value:

Type: System.Object

The first column of the first row of the results of the query

Exceptions:

Exception Condition
RdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbCommand.ExecuteScalarl()