Share via


ServerConnection.ExecuteScalar Method

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

Hinweise

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

Der Namespace, die Klasse oder das Element wird nur in der Version 2.0 von Microsoft .NET Framework unterstützt.

Überladungsliste

Name 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.

Siehe auch

Verweis

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

Andere Ressourcen

Calling Methods