Click to Rate and Give Feedback
MSDN
MSDN Library
Retired
Enterprise Library
Class Library
Database Class
Database Methods
Collapse All/Expand All Collapse All
Members FilterMembers Filter
Enterprise Library 3.1 - Class Library
Database..::..ExecuteScalar Method
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

  NameDescription
Public method ExecuteScalar(DbCommand)

Executes the command and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Public method ExecuteScalar(CommandType, String)

Executes the commandText interpreted as specified by the commandType and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Public method ExecuteScalar(DbCommand, DbTransaction)

Executes the command within a transaction, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Public method ExecuteScalar(String, array<Object>[]()[])

Executes the storedProcedureName with the given parameterValues and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Public method ExecuteScalar(DbTransaction, CommandType, String)

Executes the commandText interpreted as specified by the commandType within the given transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Public method ExecuteScalar(DbTransaction, String, array<Object>[]()[])

Executes the storedProcedureName with the given parameterValues within a transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker