Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AdoTemplate.ExecuteScalar(CommandType, String) Method

Execute the query with the specified command text.

[Visual Basic]
Public NotOverridable Overloads Sub ExecuteScalar( _
   ByVal cmdType As CommandType, _
   ByVal cmdText As String _
) _
    Implements ICommonAdoOperations.ExecuteScalar
[C#]
public object ExecuteScalar(
   CommandType cmdType,
   string cmdText
);

Parameters

cmdType
The command type
cmdText
The command text to execute.

Return Value

The first column of the first row in the result set

Implements

ICommonAdoOperations.ExecuteScalar

Remarks

No parameters are used. As with IDbCommand.ExecuteScalar, it returns the first column of the first row in the result set returned by the query. Extra columns or row are ignored.

See Also

AdoTemplate Class | Spring.Data.Generic Namespace | AdoTemplate.ExecuteScalar Overload List