Firebird ADO.NET Provider SDK Documentation - v1.7

FbCommand.ExecuteScalar Method 

Executes the query, and returns the first column of the first row in the resultset returned by the query. Extra columns or rows are ignored.

[Visual Basic]
NotOverridable Public Function ExecuteScalar() As Object _
    Implements IDbCommand.ExecuteScalar
[C#]
public object ExecuteScalar();

Return Value

The first column of the first row in the resultset.

Implements

IDbCommand.ExecuteScalar

Exceptions

Exception Type Condition
InvalidOperationException

The connection does not exist.

-or-

The connection is not open.

-or-

The transaction is not valid.

See Also

FbCommand Class | FirebirdSql.Data.Firebird Namespace