Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AdoTemplate.ExecuteScalar(CommandType, String, String, Enum, Int32, Object) Method

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

[Visual Basic]
Public NotOverridable Overloads Sub ExecuteScalar( _
   ByVal cmdType As CommandType, _
   ByVal cmdText As String, _
   ByVal parameterName As String, _
   ByVal dbType As Enum, _
   ByVal size As Integer, _
   ByVal parameterValue As Object _
) _
    Implements ICommonAdoOperations.ExecuteScalar
[C#]
public object ExecuteScalar(
   CommandType cmdType,
   string cmdText,
   string parameterName,
   Enum dbType,
   int size,
   object parameterValue
);

Parameters

cmdType
The command type
cmdText
The command text to execute.
parameterName
The name of the parameter to map.
dbType
One of the database parameter type enumerations.
size
The length of the parameter. 0 if not applicable to parameter type.
parameterValue
The parameter value.

Return Value

The first column of the first row in the result set

Implements

ICommonAdoOperations.ExecuteScalar

See Also

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