Database.EndExecuteScalar Method
Finishes asynchronous execution of a Transact-SQL statement, returning the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Namespace: Microsoft.Practices.EnterpriseLibrary.Data
Assembly: Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll) Version: 6.0.0.0 (6.0.1304.0)
Syntax
public virtual Object EndExecuteScalar(
IAsyncResult asyncResult
)
'Declaration
Public Overridable Function EndExecuteScalar (
asyncResult As IAsyncResult
) As Object
public:
virtual Object^ EndExecuteScalar(
IAsyncResult^ asyncResult
)
Parameters
asyncResult
Type: System.IAsyncResultThe IAsyncResult returned by a call to any overload of BeginExecuteScalar.
Return Value
Type: Object
The value of the first column of the first row in the result set returned by the query. If the result didn't have any columns or rows nulla null reference (Nothing in Visual Basic) (Nothing in Visual Basic).
See Also
Microsoft.Practices.EnterpriseLibrary.Data Namespace
Database.ExecuteScalar(DbCommand)
Database.BeginExecuteScalar(DbCommand, AsyncCallback, Object)
Database.BeginExecuteScalar(DbCommand, DbTransaction, AsyncCallback, Object)