Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ICommonAdoOperations.ExecuteScalar(CommandType, String) Method

Execute the query with the specified command text returning a scalar result

[Visual Basic]
Public Sub ExecuteScalar( _
   ByVal cmdType As CommandType, _
   ByVal cmdText As String _
object ExecuteScalar(
   CommandType cmdType,
   string cmdText


The command type
The command text to execute.

Return Value

The first column of the first row in the result set.


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

See Also

ICommonAdoOperations Interface | Spring.Data Namespace | ICommonAdoOperations.ExecuteScalar Overload List