Partager via


ServerConnection.ExecuteScalar Method

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

Notes

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

Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.

Liste de surcharge

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

Voir aussi

Référence

ServerConnection Class
ServerConnection Members
Microsoft.SqlServer.Management.Common Namespace

Autres ressources

Calling Methods