Mimer Data Provider

MimerCommand.ExecuteScalar Method 

Executes the query, and returns the first column of the first row in the result set returned by the query. Note that extra columns and/or rows are ignored.

[Visual Basic]
Public Function ExecuteScalar() _
    Implements IDbCommand.ExecuteScalar As Object
[C#]
public object ExecuteScalar();
[C++]
public: Object* ExecuteScalar();
[JScript]
public function ExecuteScalar(): Object;

Return Value

The first column of the first row in the result set. If the result set is empty, a null reference is returned.

Implements

IDbCommand.ExecuteScalar

Exceptions

Exception TypeCondition
InvalidOperationExceptionThe Connection is not Open.
MimerExceptionA database server error occurred while executing the statement.
ArgumentOutOfRangeExceptionThe data value of a parameter value was too large or too small to be converted to the database type.
InvalidCastExceptionThe format of the value of one of the Parameters was invalid, or the application data type can not be converted to the target database type.

See Also

MimerCommand Class | Mimer.Data.Client Namespace