This topic has not yet been rated - Rate this topic

DatabaseExecuteScalar Method (CommandType, String)

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.

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.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Data
Assembly:  Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll)
public virtual Object ExecuteScalar(
	CommandType commandType,
	string commandText
)

Parameters

commandType
Type: System.DataCommandType

One of the CommandType values.

commandText
Type: SystemString

The command text to execute.

Return Value

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

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.

Did you find this helpful?
(1500 characters remaining)