MSDN Library

ServerConnection.ExecuteScalar Method

Executes a Transact-SQL statement and returns the first column of the first row as a value type.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method ExecuteScalar(StringCollection) Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.
Public method ExecuteScalar(String) Executes a Transact-SQL statement and returns the first column of the first row as an object value.
Top

If multiple batches are specified by using a StringCollection object then the result is an array of value types.

Community Additions

Show:
© 2016 Microsoft